On Thursday 11 December 2003 14:16, Peter Walter wrote: > From the book "Core PHP programming", 3ed ; > > "As stated earlier, PHP sends session identifiers with cookies, but a > browser may refuse them. PHP can detect when a browser does not accept > cookies, and in this situation it modifies all forms and links to > include the session identifier." > > My php pages all include start_session() before any content is sent to > the browser, and my browser is configured to accept cookies. > Nevertheless, any coded relative url links (<a href=...) are all > modified to include PHPSESSID=12345, although the cookie *should* be > set. I am using PHP 4.x. Why is this happening?
When your browser first hits the page (ie when no session has been started yet) the links and the URL will have the session ID appended. This is because at that stage the server does not know your browser is accepting cookies. When you continue browsing your browser will send the session cookie thus signalling to the server that cookies are being accepted and should then no longer append the session ID. -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * ------------------------------------------ Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general ------------------------------------------ /* 90. Wow....that seemed _fast_..... --Top 100 things you don't want the sysadmin to say */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php