I have a URL with a parameter
www.url.com/page.php?n=name
Now, within a page.php I need to create a hyperlink that works with that parameter. I now have
<a href="page2.php?a=param2&n=<?php $_GET["n"] ?>" >
but this does not work and the URL shows with empty parameter "n":
http://www.url.com/page2.php?a=param2&n=
Could you please help me to pass that parameter in the hyperlink? Kindly thank you in advance.
You need to do <?php echo $_GET["n"] ?>
The echo actually prints it into the code. You were just calling it.
You need to echo the PHP out so it is echoed out to the HTML, and is then in the source code.
Like so:
<a href="page2.php?a=param2&n=<?php echo $_GET["n"] ?>" >