Hi everyone,
I need to get some more information on a sugestion by a friend in regarding to php variables when using them to create a menu.
Here is part index.php:
------------------- START-----------
<?php
if ($c != "") {
include("".$c);
} else {
include("home.php");
}
?>
---------------END--------------------
Now, I use the following structure to pass values to the variable and get the requested page :
http://www.mysite.com/index.php?c=info.php
This will make the info.php page come up.
What I have been suggested is this :
"in the file u are processing this variable 'c'
ensure that the value of 'c' has an extension .php . OR use some numbering scheme like
switch(c)
case 1
this page..
etc."
Can someone please explain what he means and give me a simple example to understand how I would need to modify my files and links to make his suggestion work ??
Thanking you in advanced.