RE: [PHP] cookies

From: Date: Wed, 27 Sep 2000 05:44:57 +0000
Subject: RE: [PHP] cookies
Groups: php.general 
Request: Send a blank email to php-general+get-17726@lists.php.net to get a copy of this message
I haven't seen the attachment, but check cookies are enabled in the browser. Check that you have set a time period for the cookies, otherwise they are session cookies for the life of the browser, which sounds like what you are getting. ni hui shuo zhongwen ma? (s'cuse the pinyin) Sample code to set: //Name, Value, Expiry (1 hour from now), Access from (on site from anywhere) <?php SetCookie("CKsample","1",time()+3600,"/"); $CKsample = 1; //always good to set in script if you need to use it as well as setting. ?> Sample code to read: <?php if (isset($CKsample)) echo "Cookie set:" . $CKsample; ?> -----Original Message----- From: Liu, Helen [mailto:HLiu@pericom.com] Sent: September 23, 2000 08:36 AM To: 'php-general@lists.php.net' Subject: [PHP] cookies Hi Everybody, I am using PHP4 on IE5.5. I have a small program just to set cookies, unset cookies and display the result. It only works at the first time (every time start the browser). Would anybody advice what's wrong? How should I do to get the similar function? Please find the detail code in the attachment. Thanks in advance. <<cookies_display.php>> <<test.php>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Helen Liu Pericom Semiconductor Corp. e-mail: helen_liu@pericom.com phone: 408-4350800 Ext. 277 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

« previous php.general (#17726) next »