Re: Login script login

From: Date: Fri, 02 Feb 2007 13:05:50 +0000
Subject: Re: Login script login
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-248191@lists.php.net to get a copy of this message
Stut wrote: > > > > I'm not totally clear what the question was in there. Personally I keep > this simple... > > <?php > $_POST['number'] = > (isset($_POST['number']) ? trim($_POST['number']) : ''); > $_POST['email'] = > (isset($_POST['email']) ? trim($_POST['email']) : ''); > > if (empty($_POST['number']) or > empty($_POST['email']) or > empty($_POST['password'])) > { > die('All fields must be entered'); > } > > // Find the customer/user/whatever you need from the given details > > if (<<not found>>) > { > die('Unable to locate customer/user/whatever'); > } > > // Set up the session here, or however you're tracking the > // current customer/user/whatever > > header('Location: /somewhere_else'); > ?> > > Hope that helps. > > -Stut > > be aware that you need a session_write_close(); before header('Location... or the session data might not be written to disk! just my 2 cent -- View this message in context: http://www.nabble.com/Login-script-login-tf3160341.html#a8766588 Sent from the PHP - General mailing list archive at Nabble.com.

« previous php.general (#248191) next »