Posted by ZeldorBlat on 01/21/06 18:24
chris_fieldhouse@hotmail.com wrote:
> verify.php checks the id and password against the database.
> if the check succeeds I use $_SESSION to track the logged in user into
> the page.
> if the check fails, I use $_SESSION["error"] to set an error message
> and then jump to login.htm, but I've lost the userid.
> The only way I can see of transferring the userid (and some other data)
> is by calling header ("Location: login.htm?id=$uid");
> and then have some php code in login.htm to $GET['uid'] and pop that
> into the user field on the form.
Ummm...you just said that you set $_SESSION['error'] and redirect to
login.php. I would assume that this is working and that you're able to
access the value of $_SESSION['error'] once you get back to the login
page.
If this is the case, why not just set their uid in the session as well?
Then you can have at it when you redirect back to the login page.
[Back to original message]
|