Simple question about functions..

Any problem with PHP can be disscused here
Post Reply
rain1138
Posts: 11
Joined: Wed Jan 05, 2005 12:32 pm

Simple question about functions..

Post 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.


Lixas
Posts: 750
Joined: Wed Feb 16, 2005 4:21 pm

Post 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
Post Reply