note 14372 deleted from function.setcookie by imajes
| From: | imajes@php.net | Date: | Wed, 30 Jan 2002 05:44:50 +0000 |
| Subject: | note 14372 deleted from function.setcookie by imajes | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-26011@lists.php.net to get a copy of this message | ||
I found that Netscape chokes on the cookie function when accompanied by a header-location function
in the form:
header ("Location:authtest.php");
The error message is "The documents contained no data." and occurs in, at least, Navigator
4.7x for Mac and 6.0 for Windows. This also occurs when the location is either explicit, contained
in a variable, or is represented by the special variable $PHP_SELF. Of course, when the user cancels
the error and presses submit once more, Netscape takes the cookie and doesn't throw up.
I bought a clue from the discussions here under "header()" and found success when I added
merely a question mark at the tail of the location document, as follows:
header ("Location:authtest.php?");
Now Netscape swallows the cookie on the first button press and is happy. And so am I.
And I'm just a newbie... but a happy one.