its for beginners.
world cooolstar Pakistan
cooolstar@gmail.com
<?
$phpself = $_SERVER['PHP_SELF']; //its you php page.
switch($_GET['id']) {
case '1':
print "hey buddy, you are on 1st id.<br> its a login page";
break;
case '2':
print "you are on the second id. <br> its a forum page";
break;
}
echo "<a href=$phpself?id=1>Login</a><br><a href=$phpself?id=2>forum</a>";
?>
Within each case statement you might want to include the code necessary to generate that page, for example:
case 1:
include(\'home.php\');
break;
This way the code doesn\'t get too confusing. It\'s also a good idea to handle form processing in a similar manner, for example:
$operator = $_POST[op];
switch($operator)
{
case \'save_data\':