I actually had a php question.
What im trying to do is create a page that uses functions and switches on its own with a URL such as:
http://testerfake.com/functions.php?op=main
then one like this:
http://testerfake.com/functions.php?op=second
Those would take you to the same file but the function in them would make it look like a different page.
I guess the trouble im having is having a page do that on its own. (Seeing the op and the main or second in the URL respectively using switch and case)
Heres an example I have that is not working.
Code: Select all
<?php
/************************************************************************/
/*Functions Example */
/************************************************************************/
function mainpage()
{
echo \\\"Main Page\\\";
}
function secondpage()
{
echo \\\"Second Page\\\";
//This would make it go back to main page:
//mainpage();
}
switch($op)
{
case \\\"main\\\":
mainpage();
break;
case \\\"second\\\":
secondpage();
break;
}
?>
Thank you very much for your help