>To test global variables, I wrote the following PHP script:
>(5)echo "$counter";
>(6)// header ("location:statistics/contents.php");
>PS: Richard, thank you for your reply, but I still don't understand why is 
>not passed.

Once you tell the browser to go somewhere else, *EVERYTHING* else you might
have told it is ignored.

It might not be the way it ought to be, but that's the way it is.

One of the things it will ignore is the Cookies sent with session_start()

So if the browser ignores those Cookies, it doesn't them back on the next
page, and PHP doesn't realize it's the same browser.

*IF* you alter your header() to include the SESSION ID that the cookies
should have sent, you will achieve success:

header("Location: statistics/contents.php?PHPSESSID=", session_id());

Like Music?  http://l-i-e.com/artists.htm

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

Reply via email to