a_glennsmith Posted December 15, 2011 Share Posted December 15, 2011 I have inherited some pages from someone else who wrote them and as I am a newbie and the code is quite old I suspect it needs to be updated in order to work. I have two variables $p and $service that were passed from page 1 to page 2 via the URL. On page 2 I have updated the code for echo $_GET['$p'] etc and I am happy with that. Lower down on page 2 within an HTML form the author has <input type="hidden" name="service" value="<? echo $service; ?>" /> <input type="hidden" name="p" value="<? echo $p; ?>" /> with the intention of putting these variables in the URL for page 3 I have to assume. Page 3 begins with this code "completeyourorder.php?p=" . $p . "&service=" . $service; but the variable values are not showing up in the URL and I can not seem to use them on page 3. In other words they don't seem to be available to me. I'd appreciate help to change the page 3 code above or the page 2 code so that it works as intended. I found some posts and researched tutorials but all that I have tried has not worked. Thanks Glenn Link to comment https://forums.phpfreaks.com/topic/253199-basic-question-variables-in-url/ Share on other sites More sharing options...
Shadowing Posted December 15, 2011 Share Posted December 15, 2011 im a noob too but this might help ya out <?php "<a href=\"profile.php?id=$goauld_name\">$grab_goauld</a><br />\n"; ?> i know for sure this 2nd format works if its related to your question im echoing into the link <?php <a href="search_goaulds.php?goauld=<?php echo $grab_goauld; ?>">Goa'ulds</a> ?> Link to comment https://forums.phpfreaks.com/topic/253199-basic-question-variables-in-url/#findComment-1298039 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.