Source: http://www.php.net/set_cookie
[snip]
Once the cookies have been set, they can be accessed on the next page load with the $_COOKIE or $HTTP_COOKIE_VARS arrays.
[/snip]


Since PHP cannot access a cookie right after it has been set PHP cannot be sure if the cookie has been accepted on client-side (user might deny cookies). Therefore PHP chooses another way of storing the current session id until next page has been loaded (GET-param, hidden-field...).


Daniel

Jordi Canals wrote:

Hi all,

I have an extrange problem with the session cookie:

In all my pages there I have this two lines to start the session:

session_name('jcwse');
session_start();

When I access my website, at any page, everytyhink works OK, and the session cookie is set with no problem except for links.

In the fist page I aceess, all links are appended with the session ID. I mean that in every link, the ?jcwse=da22311212 ... is appended. This occurs just on the load of first page (not any else). If I reload the page, then links are formed correctly with no session ID (And sessions works perfect).

This problem only arises on my ISP hosting (Linux+Apache 1.3) and does not show on my devel computer (Windows+Apache 2.0). I've been searching the manual, but found no explanation about that.

Any help will be really welcome.
Regards,
Jordi.


--
WWE e-commerce IT GmbH
Eiffestrasse 462, D-20537 Hamburg
Tel.: +49-40-2530659-0, Fax: +49-40-2530659-50

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to