note 28345 added to function.setcookie

From: Date: Fri, 10 Jan 2003 05:03:27 +0000
Subject: note 28345 added to function.setcookie
Groups: php.notes 
Request: Send a blank email to php-notes+get-41939@lists.php.net to get a copy of this message
I was having problems with making cookies work consistently in my web browser. I was running setcookie() then immediately redirecting the user to a different page like so: setcookie("name", "value"); header("Location: some_page.php"); For some reason the cookie would set itself with IE but inconsistently (about 10% of the time) with Mozilla and Opera. These two browser do not accept cookies unless the full page is loaded. The workaround is to only set cookies on pages that are never re-directed. It is unfortunate but required. -- http://www.php.net/manual/en/function.setcookie.php http://master.php.net/manage/user-notes.php?action=edit+28345 http://master.php.net/manage/user-notes.php?action=delete+28345 http://master.php.net/manage/user-notes.php?action=reject+28345

« previous php.notes (#41939) next »