sessions
| From: | Tyler Durdin | Date: | Thu, 01 Aug 2002 16:37:17 +0000 |
| Subject: | sessions | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-110702@lists.php.net to get a copy of this message | ||
I have a login page using sessions the old way. I have switched it to using $_SESSION['valid_user']and was wondering how to switch this (below) part of my code. In the if statement I am checking to see if the session is registered, but using $_SESSION[''] I do not understand how to do this or the isset statement. As of now my login page will login anyone and log them in as whatever they type in the username and password fields even if the are not in the DB.
if (session_is_registered("valid_user"))
{
blah blah...
}
else
{
if (isset($userid))
{
echo "Could not log you on";} else {
echo "You are not logged in";} //this is where I created my login form that submits to itself and runs through the code _________________________________________________________________ Join the worlds largest e-mail service with MSN Hotmail. http://www.hotmail.com