kendhal Posted April 24, 2008 Share Posted April 24, 2008 I am writing a redirect script that redirects traffic to different URLs based on the user agent string. I am saving the different URLs as variables at the top of the script and the URLs have multiple parameters separated by "&". My problem is that everything after the first "&" is ignored in the variable. For example: $linkone = "http://www.somedomain.com/rd/r.php?id=400075&sid=16&c1=link1"; PHP saves this URL in the variable such that $linkone effectively becomes: "http://affiliate.admtracker.com/rd/r.php?affid=400075" All I am doing at the end is redirecting to the $linkone variable: header("Location: ".$linkone); What do I need to let the '&' not truncate the url string Thanks! KD Link to comment https://forums.phpfreaks.com/topic/102814-passing-multiple-parameters-in-url/ Share on other sites More sharing options...
947740 Posted April 24, 2008 Share Posted April 24, 2008 Maybe try a \ to make it a literal character? Link to comment https://forums.phpfreaks.com/topic/102814-passing-multiple-parameters-in-url/#findComment-526629 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.