note 37256 deleted from faq by didou

From: Date: Fri, 07 Nov 2003 16:50:27 +0000
Subject: note 37256 deleted from faq by didou
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-60108@lists.php.net to get a copy of this message
Note Submitter: aryanj@hotmail.com ---- I do not have much experience in PHP.I try to set a cookie in my script. I have two tables. One is sorted by "studios" and the other one sorted by "sessiontime". There is one variable that defines which table has to be shown on the screen. The default table is the one which is sorted by sessiontime. What I want is to leave the page when the table is sorted by studios and when I open a new browser see the table which is sorted by studios and not the default one. I think that I have to put array "setcookie" on the top of my script: setcookie ("cookie[session]", "cookiesession", time()+24 * 60 * 60); setcookie ("cookie[studio]", "cookiestudio", time()+24 * 60 * 60); if (isset ($cookie)) { while (list ($name, $value) = each ($cookie)) { echo "$name == $value<br>\n"; } } And then have to call the cookie somewhere in the tables: $_cookie[$cookie[session]]; //in the sessiontime table $_cookie[$cookie[studio]]; //in the studio table This seems not to work. I see that one cookie has been created, but every time I open a new browser, I just see the default table on the screen. Does anyone know what the problem could be? Thanks Aryan

« previous php.notes (#60108) next »