Re: Cookie problem
| From: | Curt Zirzow | Date: | Mon, 16 Jan 2006 08:08:31 +0000 |
| Subject: | Re: Cookie problem | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-228645@lists.php.net to get a copy of this message | ||
On Sat, Jan 14, 2006 at 12:57:46PM -0500, Al wrote:
> Can't get a cookie to set. Below is the code near the file top BEFORE any
> html output.
> ...
> ## code
> print_r($_POST)
> session_start();
> print_r($_COOKIE);
headers could be sent already, up your error_reporting, or check
your logs for headers already sent on line ...
>
> if(isset($_POST['prefs']))
> $cookie= setcookie("listpref", $_POST['filter'], time()+7776000);
what is the time() on the server vs the client?
is $_POST['filter'] set?
what is the actual header content set upon request?
livehttpheaders for Firefox is a good tool, if you dont have that
then the 'View Response Headers' via the Web Developer tool for
Firefox.
Curt.
--
cat .signature: No such file or directory