RE: [PHP-WIN] newbie cookie question
| From: | Larry Hotchkiss | Date: | Mon, 04 Dec 2000 16:01:13 +0000 |
| Subject: | RE: [PHP-WIN] newbie cookie question | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-4281@lists.php.net to get a copy of this message | ||
Ok, I think I found where the problem lies. I am developing on the same
system the web server and mysql reside at the moment. When I access the
pages via "localhost" thats when the problems seem to arise. When I use the
systems IP (I dont have a registered domain for the system in question),
the cookies get registered properly and can be called up properly. Thanks
one and all for all your input!
Larry Hotchkiss
On Monday, December 04, 2000 9:38 AM, JJeffman
[SMTP:jjeffmanweb@conex.com.br] wrote:
> 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
> >
>
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-windows-unsubscribe@lists.php.net
> For additional commands, e-mail: php-windows-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>