any idea on how id be able to do this? help will be really appreciated.
QUESTION, setting super globals
Moderator: General Moderators
QUESTION, setting super globals
hello again people, I'm working on a site, wherein an administrator can look up for registered users, and after querying the database, data is then displayed as links, i would want that when the administrator clicks on one of those links a superglobal value is then changed to the value taken from the linked clicked.
any idea on how id be able to do this? help will be really appreciated.
any idea on how id be able to do this? help will be really appreciated.
Re: QUESTION, setting super globals
i think you are getting confuse, superglobals in php are $_GET, $_POST,$_SESSION, $_REQUEST, etc
I dont think you want to change those
I dont think you want to change those
- Ollie Saunders
- DevNet Master
- Posts: 3179
- Joined: Tue May 24, 2005 6:01 pm
- Location: UK
Re: QUESTION, setting super globals
Use the string facilities of PHP to construct a URL:
A relative URL such as ?user=10 will link back to the page that outputs that URL with $_GET['user'] being set to 10. Basic PHP tutorials will explain this more completely.
Code: Select all
echo '<a href="?user=' . $userId. '">' . "$userName</a>";