gavin1512 Posted January 24, 2008 Share Posted January 24, 2008 Good Afternoon All, I having a bit of trouble passing back 2 variables in a header, was wondering if it is possible and how best to do it, here is the code I attempted to use: header("Location:productsearch.php?var=productnumber?message=$message1"); As you can see I am trying to pass a the productnumber and message back to a page. Can anyone help me please Link to comment https://forums.phpfreaks.com/topic/87543-solved-fairly-simple-onepassing-2-variables-in-the-header/ Share on other sites More sharing options...
aebstract Posted January 24, 2008 Share Posted January 24, 2008 header("Location:productsearch.php?var=productnumber&message=$message1"); If you are passing multiple variables in such a way, use an & sign instead of the ? between each variable. That should fix your problem. Link to comment https://forums.phpfreaks.com/topic/87543-solved-fairly-simple-onepassing-2-variables-in-the-header/#findComment-447757 Share on other sites More sharing options...
gavin1512 Posted January 24, 2008 Author Share Posted January 24, 2008 Thank you! thought it would be a simple character like that Link to comment https://forums.phpfreaks.com/topic/87543-solved-fairly-simple-onepassing-2-variables-in-the-header/#findComment-447764 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.