Page 1 of 1

Simple question about functions..

Posted: Wed Jan 05, 2005 1:01 pm
by rain1138
Hello,

I used to know how to do this but i really don't remember how.

I just need to build pages on functions.

admin.php will have a set of functions for like memberlist, settings, ect... but I need it to build a url for each function so that it turns into admin.php?page=memberlist and so on...

I know its quite simple but I can't remember how to do it for the life of me.

Posted: Tue Feb 22, 2005 9:47 am
by Lixas
if i understand right, is should be like this

Code: Select all

<?if (isset($_GET['page']))
{$page= $_GET['page'];}
else {$page = "not_found";}
if (page=="memberlist")
{/* page source or function that do its, ir include to that page */}
elseif ($page=="home")
{/* and so on, so on, so on....*/}
elseif($page=="not_found")
{echo "page was not found, contact admin";} ?>
if u need not this, explain me more