AusQB
12 Mar 2009, 11:40 AM
<?php
if (isset($_REQUEST['tab'])) {
$tab = $_REQUEST['tab'];}
else {$tab = 1;}
?>
<?php
switch ($tab) {
case 1:
?>
<b>Tab 1</b>
<a href="index.php?tab=2">Tab 2</a>
<?php include("page1.php"); ?>
<?php
break;
case 2:
?>
<a href="index.php?tab=1">Tab 1</a>
<b>Tab 2</b>
<?php include("page2.php"); ?>
<?php
break;}
?>
In the above code, how do I change the variable "tab" to a custom name? For example, instead of having "index.php?tab=1", I would like "index.php?mypage".
if (isset($_REQUEST['tab'])) {
$tab = $_REQUEST['tab'];}
else {$tab = 1;}
?>
<?php
switch ($tab) {
case 1:
?>
<b>Tab 1</b>
<a href="index.php?tab=2">Tab 2</a>
<?php include("page1.php"); ?>
<?php
break;
case 2:
?>
<a href="index.php?tab=1">Tab 1</a>
<b>Tab 2</b>
<?php include("page2.php"); ?>
<?php
break;}
?>
In the above code, how do I change the variable "tab" to a custom name? For example, instead of having "index.php?tab=1", I would like "index.php?mypage".