sillysillysilly Posted March 12, 2009 Share Posted March 12, 2009 I am trying to pass two variables through GET that I do in a link. The problem is that they don't come across correctly. here is how I pass the variables. echo "<a href='adrepoststep2.php?id={$row['adid']}?name=$emailaddress'>{$row['adid']}</a><br />"; Then in the that loads I try to read those two variables out with this: $adid =$_GET['id']; $email=$_GET['name']; echo $adid; echo "<br>"; echo $email; What displays is: 1?name=bobcrew8@gmail.com the 1 is the ad ID, why is it displaying the ?name= But when the rest of my script runs it acts like it does not know what $email is. Thanks for your help guys (and gals) Quote Link to comment https://forums.phpfreaks.com/topic/149050-solved-get-variables-not-working-correctly/ Share on other sites More sharing options...
Philip Posted March 12, 2009 Share Posted March 12, 2009 The separator for GET vars is &, not ? foo.php?bar=something&other=5 Quote Link to comment https://forums.phpfreaks.com/topic/149050-solved-get-variables-not-working-correctly/#findComment-782644 Share on other sites More sharing options...
sillysillysilly Posted March 12, 2009 Author Share Posted March 12, 2009 thanks, I had tried the & but had similar results. Just tried it again but its ok now. Strange. I think it might have been a refresh problem. I really appreciate your help. Quote Link to comment https://forums.phpfreaks.com/topic/149050-solved-get-variables-not-working-correctly/#findComment-782646 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.