note 5953 deleted from function.setcookie by philip

From: Date: Tue, 21 Jan 2003 21:32:28 +0000
Subject: note 5953 deleted from function.setcookie by philip
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-42538@lists.php.net to get a copy of this message
We generally use like this. setcookie("admin_ck", $login_id); This is ok.... But... If suppose you setcookie on /a/b/c.phtml then you use this cookie on /a/b and a/b's sub-directory only. So, I recommend below form without special reason. setcookie("admin_ck", $login_id, time()*3600, "/~saram/", "www.saram.com"); [Editor's Note: if you are having problems sharing a cookie between sub-directories, simply set the path attribute to "/". this will give that cookie reign over the whole web tree. this will allow you to set a value in one directory, and then read it in another.]

« previous php.notes (#42538) next »