Re: Cookie problem

From: Date: Thu, 20 Sep 2001 07:21:04 +0000
Subject: Re: Cookie problem
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-67951@lists.php.net to get a copy of this message
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 >

« previous php.general (#67951) next »