hey guys, as you can see this is my first post in this forum. I just started with php cause i want to create my own website and not depend on a CMS like nuke. Anyways, i have created my site layout successfully and created a basic site locally on EasyPhp. The switch function worked. but now i changed some ways the site worked like making a separate header and footer file and including them, and now the switch function isnt working. I tried uploading it to a free host (byethost, 110mb) and others, and still didnt work.
this is just a test page.
include("dbcon.php");
function index(){
include("header.php");
Opentable();
echo"<a href=\"index.php?do=test\">Test</a>";
Closetable();
include("footer.php");
}
function test(){
include("header.php");
Opentable();
echo"Switch works";
Closetable();
include("footer.php");
}
switch($do){
case 'test':
test();
break;
default:
index();
break;
}
?>
the address bar is navigated to http://127.0.0.1/a/index.php?do=test but i still get the contents of the function index() and not the contents of the function test()