Re: Cookies - after redirecting
| From: | dav | Date: | Tue, 06 Nov 2001 17:18:45 +0000 |
| Subject: | Re: Cookies - after redirecting | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-73616@lists.php.net to get a copy of this message | ||
Read netscape declarations, maybe the location should be set before the
cookie header.. check ...
Try to use the "microsoft" way to redirect (HTTP-EQUIV)
J
"L33t" <quake3@cantv.net> ha scritto nel messaggio
news:008001c166cf$d8c531f0$0500a8c0@sayaka.local...
Hi, I'm having this problem with my script, when I set the cookies and then
redirect the next page doesn't read the cookies, example
Page 1:
----------
<?php
setcookie("item",tour);
header("LOCATION: show.php");
?>
Page 2:
----------
<?php
echo $item;
?>
That doesn't print anything,,
but if I eliminate the header and place a manual link, it does work, any
idea?
<?php
setcookie("item",phone);
// header("LOCATION: show.php");
echo "<a href='tour.php'> Show Basket </a>";
?>
Page 2:
----------
<?php
echo $item;
?>
thanks..