robert123 Posted January 19, 2009 Share Posted January 19, 2009 Hi, I am very new to php and just cannot figure this out. I am trying to use a link to send a value to the next website page. For example I am using this code but it is not working right. I assigned a keyword a number value and want to pass that value to the next page. When use echo $id on the first page, it shows me the value so I know it worked, but I can't send the data to the next page. href="h*ttp://www.website.com/page.php?ORDER=<? '.$id.' ?>" $id has a number value that I want to read from the next page, but with this code on the destination page it will not show me the value it just is blank. <?php $id = trim($_GET['ORDER']); echo $id; ?> I hope you understand what I was trying to say. Thanks, Robert Link to comment https://forums.phpfreaks.com/topic/141393-i-need-help-sending-a-variable-value-thru-a-link/ Share on other sites More sharing options...
5kyy8lu3 Posted January 19, 2009 Share Posted January 19, 2009 Hi, I am very new to php and just cannot figure this out. I am trying to use a link to send a value to the next website page. For example I am using this code but it is not working right. I assigned a keyword a number value and want to pass that value to the next page. When use echo $id on the first page, it shows me the value so I know it worked, but I can't send the data to the next page. href="http://www.website.com/page.php?ORDER=<? '.$id.' ?>" $id has a number value that I want to read from the next page, but with this code on the destination page it will not show me the value it just is blank. <?php $id = trim($_GET['ORDER']); echo $id; ?> I hope you understand what I was trying to say. Thanks, Robert <a href="http://www.website.com/page.php?ORDER=<?php echo $id; ?>"> Link to comment https://forums.phpfreaks.com/topic/141393-i-need-help-sending-a-variable-value-thru-a-link/#findComment-740157 Share on other sites More sharing options...
robert123 Posted January 19, 2009 Author Share Posted January 19, 2009 Thanks so much, I just tried it and it works great. Link to comment https://forums.phpfreaks.com/topic/141393-i-need-help-sending-a-variable-value-thru-a-link/#findComment-740159 Share on other sites More sharing options...
5kyy8lu3 Posted January 19, 2009 Share Posted January 19, 2009 Thanks so much, I just tried it and it works great. no problem, glad i could help. i'm always the one needing help here so it's good to see i can help on occasion too lol Link to comment https://forums.phpfreaks.com/topic/141393-i-need-help-sending-a-variable-value-thru-a-link/#findComment-740161 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.