&PHPSESSID Added to Hyperlinks!
Posted on 2004-11-19
Whenever I add session_start(); to the top of my webpage in order for some code that uses Sessional Data to work the following is appended to all my hyperlinks in the GET area:
So for example a link to 'page.php' would now look like this:
<a href="page.php?my_var=something&PHPSESSID=4c56db88889c27838f4b54f7408d63">Click Here</a>
Why is PHP adding this 'PHPSESSID' variable to my links when I use session_start(); ?
I don't want this behaviour because it is failing my W3C HTML Validation.
Here's what my PHP looks like:
# Page Information Comments
# Rest of Code here
The session_start function call is the first line (after some comments).
I notice if I remove the line session_start(); the PHPSESSID variable dissapears, but at the same time my Sessional Code stops working.
How can I use sessions but stop the PHPSESSID rubbish?