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
https://forums.phpfreaks.com/topic/61688-what-php-code-do-i-need/
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. 

}
?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.