note 44752 added to function.setcookie

From: Date: Sun, 15 Aug 2004 14:14:56 +0000
Subject: note 44752 added to function.setcookie
Groups: php.notes 
Request: Send a blank email to php-notes+get-74706@lists.php.net to get a copy of this message
Sorry Secure not Secure=1.... Instead of setcookie it would be much safer to use the new better specs and send the following. A 1 hour cookie is as follows: header('Set-Cookie: TestCookie=something+from+somewhere; Max-Age=3600; Domain=.www.domain.com; Path=/; secure;'); To Delete a cookie set -1: header('Set-Cookie: TestCookie=something+from+somewhere; Max-Age=-1; Domain=.www.domain.com; Path=/; secure;'); -Ben ---- Manual Page -- http://www.php.net/manual/en/function.setcookie.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+44752 Delete -- http://master.php.net/manage/user-notes.php?action=delete+44752&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+44752&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#74706) next »