I currently have a url, something.com, that points to my index.php. How can I pass variables back to that page using anchor tags? I tried the following which did not work: a href= 'index.php?uid=1' a href= 'http://www.something.com?uid=1 a href= 'http://www.something.com/index.php?uid=1
If I don't use http:// within the anchor tags it automatically add a '/' which disrupts the '?uid=1' part of the string. Any ideas?
Have you checked $GET['uid'] or $REQUEST['uid']? Put a <?php phpinfo(); ?> near the end of your page and it should show you the information you need to see.
It shows me that \index.php is where the url points to but I still don't know how I can add variables to the url without it adding the '/' in the response. Thanks so far.
How are you trying to recieve those variables?
the correct html shud be <a href="index.php?nameofthevariable1=value1&nameofthevariable2=value2">click me</a>.
but how are you trying to collect that variable's value ?
I tried that but the status window shows the url as being http://www.something.com/index.php?uid=1 And seeing as the original url already points to index.php it comes out like index.php/index.php?uid=1
Could it be the server should point to www.something.com/index.php instead of just www.something.com? Is this making sense?
FYI, I use the uid in a switch statement to determine what section should be displayed in the index page.