Re: another easy cookie question
| From: | Chris Hobbs | Date: | Fri, 14 Sep 2001 16:58:40 +0000 |
| Subject: | Re: another easy cookie question | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-67390@lists.php.net to get a copy of this message | ||
George Pitcher wrote:
<?php header("Location:index.php"); setcookie("Cookievalue", "abcdefghijklmnopqrstuvwxyz0123456789", time()+3600);A couple of things: First, I believe Location: must have a space after it, as well as a fully qualified URL (ie. http://wherver.com/index.php). Second, once you've sent the Location header to the browser, I would expect it to immediately request the new page, and therefore not get the cookie you send afterwards. Why not just set the cookie in index.php? My $0.02... -- _______ ___ _ ____ _____ Chris Hobbs / ____\ \ / / | | |/ ___\| __ \ Head Geek | (___ \ \ / /| | | | (___ | | | | WebMaster \___ \ \ \/ / | | | |\___ \| | | | PostMaster ____) | \ / | |__| |____) | |__| | \____/ \/ \____/ \____/|_____/ http://www.silvervalley.k12.ca.us chobbs@silvervalley.k12.ca.us