PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
It's really a stupid question but I don't know how to look for it with google or anything else. I wrote a php script (with your help) that get's all the users from a db and displays them as links to another page. The other page will load the entire row in the db for the user you clicked on. I wanted to know how to make the last page understand wich user's info to show. Don't know for sure how to explain it but I think that something like
anything after the ? will be considered a variable in PHP (and pretty much any other web scripting language).
in your case, as long as the user name is unique, you could query the database for that user name and return all of the information about that user name.
use the $_GET['varname'] array for your variable(s). To add more variables to the url string, separate them with the & sign.
I'm trying to figure out a way to detect if the ? has been used in the address so that I can add an extra variable in the address bar or whether the code needs to add the ?...
for example:
I want to have a funtion that will add a variable to the current address as a link.
Current Page: page.php?Print=Full
inside page I add a AddVarLink("Show=10") as a link. The idea is that the function would return the PHP_SELF but as page.php?Print=Full&Show=10 or if the Print=Full wasn't in the original page it would return page.php?Show=10