Need help with sessions
| From: | ODCS | Date: | Tue, 08 Apr 2003 22:57:24 +0000 |
| Subject: | Need help with sessions | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-142966@lists.php.net to get a copy of this message | ||
I must be missing something here as I can not get this to work. I have a
simple login script - if the login is successfull the user is forwarded to
another page, if not he is returned to the login page.
index.php has the form in it - when the user clicks submit it is sent to
check.php for validation. In check php I have the following.
if (!session_is_registered("logged")) { // This is the very first thing in
check.php
session_register("logged");
}
.... more validation code.....
if the validation is successful - $logged["logged_in"] is set to "True";
Now here is the problem - what do I put in main.php and other pages to
verify that the user is actually logged in. I have tried many variations of
conditional statements, but no matter what I put here I can't get it to
recognize that $logged["logged_in"] is equal to "True".
I hope I have explained this properly. Any help is appreciated.