Hello everyone,
I am very new to PHP and I ran into a problem and I don't know how to solve... I want to pass in the anchor id and the parameter value to the next page through the URL, but I can't figure out the way to do it, and I am not sure if it is even doable
firstPage.php:
Code:... <a href="secondPage.php#menu?name=bob">link</a> ...
secondPage.php:
the second page doesn't receive the $_GET['name'] variable, if i print the value, it prints nothing.Code:... <div id="menu">...</div> ... <?php print $_GET['name']; ?>
I am thinking the reason may be the anchor tag, and php interpreter interprets everything after the # is the id of the anchor. Is there anyway to escape the anchor in front of the '?'? Thanks.


Reply With Quote

Bookmarks