robert123 Posted April 22, 2009 Share Posted April 22, 2009 Hi, this is probably something very simple I am missing as I am not to familiar with php, but I have a variable declared as $id and I want to pass it in the url to the next page. I thought you did this by adding this ?value=echo $id; It did not send $id to the next page, is seems to just send "echo". If I leave out the echo and just have ?value=$id; will that work? here is part of my code: <? $landingpage[1] = 'http://www.website.com/page1.php?value=echo $id'; ?> thanks Quote Link to comment Share on other sites More sharing options...
tang Posted April 22, 2009 Share Posted April 22, 2009 I assume that you are echoing the value of $landingpage[1] later in your page, if so: $landingpage[1] = 'http://www.website.com/page1.php?value='.$id; If you do need to show the landingurl you've just assigned to the variable just do: echo $landingpage[1]; Quote Link to comment Share on other sites More sharing options...
mike12255 Posted April 22, 2009 Share Posted April 22, 2009 try this: $landingpage[1] = "http://www.website.com/page1.php?value=$id"; Quote Link to comment Share on other sites More sharing options...
cringe Posted April 22, 2009 Share Posted April 22, 2009 Doesn't that need to use rawurlencode() ? $landingpage[1] = 'http://www.website.com/page1.php?value=' . rawurlencode($id); Chris Quote Link to comment Share on other sites More sharing options...
Gighalen Posted April 22, 2009 Share Posted April 22, 2009 <? $landingpage[1] = 'http://www.website.com/page1.php?value=$id'; ?> or <? $landingpage[1] = 'http://www.website.com/page1.php?value='.$id; ?> Quote Link to comment Share on other sites More sharing options...
robert123 Posted April 23, 2009 Author Share Posted April 23, 2009 Thanks everyone, I got it working now. $landingpage[1] = 'http://www.website.com/page1.php?value='.$id; That did the trick. Quote Link to comment 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.