Cookie header and location header.
| From: | Ns_Andy | Date: | Wed, 09 Jul 2003 11:50:49 +0000 |
| Subject: | Cookie header and location header. | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-154528@lists.php.net to get a copy of this message | ||
In PHP4.3.x
If I set a cookie with setcookie and send a location header immediately.
I find no problem for the task.
That is,
<?php
setcookie("testcookie","teststr",time()+360000);
header ("Location:nextpage.php");
?>
And testcookie can be found in the latter page.
However, I can't In PHP4.1.x
What's the problem?
A compromised method of using meta refresh of zero second is used.