PHP urlencode() tacking on ?SID=xxx ... Why?

Posted by retailevolved on Stack Overflow See other posts from Stack Overflow or by retailevolved
Published on 2010-05-03T19:54:10Z Indexed on 2010/05/03 19:58 UTC
Read the original article Hit count: 321

Filed under:
|
|

I am trying to output a simple link.

This works great:

$url = 'http://www.google.com';
echo $url;

This doesn't work great:

$url = 'http://www.google.com';
echo urlencode($url);

The second example tacks on "?SID=xxx" to the end of the URL for some reason. How do I prevent this from happening?

Note: The code to generate the URL has been changed to protect the innocent.

© Stack Overflow or respective owner

Related posts about php

Related posts about session