Jump to content

what php code do i need


IceDragon

Recommended Posts

can anyone help me with the code below.. what kind of a php code do i need to tell it what content to put in test_1.php?option=1

 

<div id="Content" align="center">
<div id="Title" align="center">= TESTs =</div>
<br>
     <a href="test_1.php">= Test 1 =</a><br>
     
   <div id="Bar" align="center"></div>
</div>

<div id="Content" align="center">
<div id="Title" align="center">= Test 1 Options =</div>
<br>
     <a href="test_1.php?option=1">Option 1 </a><br>
     <a href="test_1.php?option=2">Option 2 </a><br>
     <a href="test_1.php?option=3">Option 3 </a><br>
     <a href="test_1.php?option=4">Option 4 </a><br>

<THIS is the content i want to appear when i open test_1.php?option=1>

<div id="Bar" align="center"></div>
</div>

Link to comment
Share on other sites

<THIS is the content i want to appear when i open test_1.php?option=1>

 

<?php
switch($_GET['option'])
{
case 1:
  // content for 1.
  break;
case 2:
  // content for 2.
  break;

  ....

default:
  // default content when no option is defined. 

}
?>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.