Re: Sessions problem w/ header()

From: Date: Wed, 06 Dec 2000 21:33:02 +0000
Subject: Re: Sessions problem w/ header()
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-28991@lists.php.net to get a copy of this message
Hmm I guess I was thinking in different paths than I was supposed to... Forget My last reply will you ;-) ----- Original Message ----- From: "Angel Behar" <abehar@pacificnet.com.mx> To: <php-general@lists.php.net> Sent: Wednesday, December 06, 2000 7:30 PM Subject: [PHP] Sessions problem w/ header() > Hi I'm running PHP 4.0.3pl1 with -enable-trans-sid and working with sessions > good. But then I wrote a simple script to authentificate an user, if he > match then I set_register some variables and then redirect to other page via > header(), atually I start that page with session_start() too but when I try > to read the session variables don't exist, please point me if I'm doing > something wrong, this is the code : > > <? > session_start(); > // MYSQL Stuff > > if ($login = $resultado[0] and $password = $resultado[1]) { > $id = $resultado[2]; > $log = $resultado[0]; > $pass = $resultado[1]; > session_register("$id"); > session_register("$log"); > session_register("$pass"); > header ("Location: > http://$HTTP_HOST/$FILES_DIR/login_ok.php"); > exit(); > } else { > header ("Location: > http://$HTTP_HOST/$FILES_DIR/templates/error_login.html"); > exit(); > } > ?> > > Hope any one can help me. > > Thanks in advance. > > Angel. > > > -- > 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 (#28991) next »