Re: Cookie problem

From: Date: Thu, 20 Sep 2001 08:16:11 +0000
Subject: Re: Cookie problem
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-67954@lists.php.net to get a copy of this message
It depends on which browser you are using and on what platform. On the MacOS in IE you can view cookies by going to Edit -> Preferences -> Cookies in Netscape you can also view the cookies with the Preferences menu. On the PC it's a little more difficult. In IE you go to Tools -> Internet Options -> General [Tab] -> Settings -> View Files... and then sort by file type, go down to text files and you'll see all your cookies. Now in Netscape I think it's a little bit easier, but I am afraid I do not have netscape currently on the pc machine (will get it soon) so I cant help you there, but I do believe it's a lot easier. In other words you can almost always view your cookies within the browser application menus. Rick > your header line works fine, but where are cookie files written? > i didn't see any cookie file about it in my windows/cookie directory > after it had been created?? > > thanks > > Richard Baskett wrote: > >> Here use this cookie that I wrote, it works in every browser, every os. >> >> ------------------------------------------------------------------------ >> >> function NextYear () { >> $today = gmdate("l, d-M-"); >> $today .= gmdate("Y")+1; >> $today .= gmdate(" H:i:s")." GMT"; >> return $today; >> } >> >> $oneYear = NextYear(); >> header("Set-Cookie: CookieName=$CookieNameVar; path=/; expires=$oneYear"); >> >> ------------------------------------------------------------------------ >> >> This has never let me down, enjoy :) >> >> Rick >> >> >>> hi, >>> i have a problem with cookie. >>> >>> true >>> login page -> decide page -> main page >>> | >>> false >>> | >>> login page >>> >>> username and password are posted by login page to decide page, if it's >>> true, main page will be opened. when decide page is active, cookie is >>> created by line "setcookie("form", $value). >>> but i've never seen the cookie file about it in windows\cookie >>> directory. and sometimes cookie is created and sometimes not.. >>> >>> and i didn't use any session, shall i use it for this work? >>> what can i do about these problems? >>> >>> thanks >>> >>> >>> -- >>> PHP General Mailing List (http://www.php.net/) >>> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net >>> For additional commands, e-mail: php-general-help@lists.php.net >>> To contact the list administrators, e-mail: php-list-admin@lists.php.net >>> >>> >> > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#67954) next »