How can I use one index.php to do different functions?

I am trying to use one index.php to do different commands based upon what is clicked. For instance,
I have a way of checking the status of a running server. The page displays “Online” if it is online, however, if it is not online, it displays “offline” and a “click here to start service” button. The problem, however, is that it either must be done with POST and is completely hidden, or with GET and it shows as URL “…index.php?ftpstart=Start”.
What I would be most happy with is a URL more like “…index.php?ftpstart” but I’m not sure how to submit only as ftpstart with no value/variable. I believe then I’ll be able to check it kind of via boolean, as either True or False. I’m not even sure how to properly word what I’m looking for to google it.

I was thinking I could simply just href …index.php?astart but i’m not sure if there is a “correct” way to do what i’m doing.

Please help a noob out! =]

Thanks!

Sounds like what you want is mod rewrite. You can have the url be what it needs to be, but appear to be something completely different.

Sponsor our Newsletter | Privacy Policy | Terms of Service