Re: Weirdness with setcookie() (3rd time - come on people :)
| From: | Mark Maggelet | Date: | Tue, 14 Nov 2000 02:05:29 +0000 |
| Subject: | Re: Weirdness with setcookie() (3rd time - come on people :) | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-25091@lists.php.net to get a copy of this message | ||
jumping in...
>correct me if i'm wrong, but I think the location is your problem.
>the
>browser won't set the cookie until the header with the cookie
>information is sent to it. If you redirect the user to
>another_file.php
>it won't make a trip to the browser, in between the call to this
file
>and another_file.php. So when you call another_file.php there is no
>cookie being sent to the browser. Does that make sense?
no, that's not right, the redirect, the browser makes a separate
request for the new file, and so should send the cookie.
here's some things to check:
1) are cookies turned on? (obviously)
2) the specs I've seen say to use a full url
("http://www.mydomain.com/admin/another_file.php")
you might want to
try that.
3) is another_file.php in /admin/ ? if not the cookie doesn't get
sent with the request.
- Mark