Reply to Re: [PHP] Cookie problem

Your name:

Reply:


Posted by Curt Zirzow on 10/04/11 11:37

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

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация