Re: user system using sessions and cookies?

From: Date: Wed, 04 Dec 2002 15:27:29 +0000
Subject: Re: user system using sessions and cookies?
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-17261@lists.php.net to get a copy of this message
Hello Kieran, Wednesday, December 04, 2002, 5:12:07 PM, you wrote: KH> <?PHP KH> session_start(); [...] KH> session_register('username'); KH> session_register('password'); header("Location: ".$_SERVER['PHP_SELF']); exit; You forgot these lines ^^^^^^^^^^^^. Now you can test it something like that <?php if (!isset($_SESSION['username']) || !isset($_SESSION['password'])) { session_register('username'); session_register('password'); header("Location: ".$_SERVER['PHP_SELF']); exit; } else { echo $_SESSION['password']." - ".$_SESSION['username']; } ?> -- Best regards, Alexander Kuznetsov

« previous php.windows (#17261) next »