Jump to content

passing multiple parameters in URL


kendhal

Recommended Posts

 

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.