Re: newbie cookie question

From: Date: Mon, 04 Dec 2000 15:37:45 +0000
Subject: Re: newbie cookie question
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-4277@lists.php.net to get a copy of this message
The code bellow was adapted from "PHP Professional Programming" - WROX book and is working fine at www.eletromaster.com.br/indexn.html . code: .... $cookieLifeTime = time() + 30 * 86400 ; $cookiePath = "/" ; $cookieDomain = "/" ; if(empty($check)){ $this_url = ".$PHP_SELF?check=1"; setcookie("cookietest","1",$ cookieLifeTime,$cookiePath); header("Location: $this_url"); } else{ if(empty($cookietest)){ header("Location:http://$HTTP_HOST$DOCROOT/security.html#cookie"); } else{// Cookie is enabled // Set another cookie value } } .... Jayme. http://www.conex.com.br/jjeffman -----Mensagem Original----- De: Larry Hotchkiss <lhotch@unicap.com> Para: 'PHP windows list' <php-windows@lists.php.net> Enviada em: segunda-feira, 4 de dezembro de 2000 12:53 Assunto: RE: [PHP-WIN] newbie cookie question > Thanks for the heads up Tom. What I am doing is pulling up a form, posting > the user/pass combo to a *.php which in turn authenticates and based on > weather it succeeds or fails in turn sends header info to bring up an > appropriate web page. On successfull authentication, I am simply trying to > user the $cookie_user that I just set to do another query and display some > of the users data. However, even though $cookie_user is written to the > cookies.txt file I am not getting anything returned. I checked for the > track_vars in the ini file and in 4.03 its default to on so I dont know > where to go from here. > > Larry >

« previous php.windows (#4277) next »