Sinbad_Sakic Posted October 24, 2008 Share Posted October 24, 2008 Hi to everyone I have the following problem: I need from visitors of my website, to choose an item from item list, and depending on what they have selected, to be redirected to different pages, when submit is clicked. The link will vary - so I created this script: <?php $first = $_REQUEST['first'] ; $second = $_REQUEST['second'] ; $address = '$first + $second' ; header( "Location: http://www.somedomain.com/$address" ); ?> When I leave just one variable (for example, just $first) the link is working, and everything is fine. But when I add another variable, $second, the link won't work. Any ideas where the error might be? Thanks in any case SS Link to comment https://forums.phpfreaks.com/topic/129965-simple-redirection-problem/ Share on other sites More sharing options...
GKWelding Posted October 24, 2008 Share Posted October 24, 2008 replace $address = '$first + $second' ; with $address = $first.$second ; Link to comment https://forums.phpfreaks.com/topic/129965-simple-redirection-problem/#findComment-673734 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.