Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
Problem passing variables with URL
I know this is a very simple problem, but I can't figure out why it's not working...
I have the following in index.php:
$pageid = "index";
In header.php, i have a link...
if ($pageid != "test1")
print "<a href="index.php?pageid=test1" >test1";
The first time the page loads, $pageid does not exist, so it should be set to index. However, after I click on the link, the URL should pass a pageid variable to index.php. It does not do this. The echo statement always returns $pageid as "index".
I know I'm probably doing something really stupid, but please help!
0 · ·