I'm trying to make a special parameter that when it's accessed it opens another php file on my webserver , Here's what I've been trying to do
<?php
$id = ($_GET['id']) ? $_GET['id'] : $_POST['id'];
switch($id)
{
case 'account':
require 'pages/cp.php';
break;
}
?>
So when the user authenticates to , let's say : http://www.test.com/?id=account , It should automatically authorize the user to the file cp.php .
Problem is that it doesn't redirect , It just remains on the index.php file .
Note : The above PHP code exists in the index.php !
Thanks!