I always just register an extra variable to track logged in users. If the user has
logged in, it is set to TRUE, if not, FALSE. Then I just do comparisons on that
variable.
<?php
session_start()
if($loggedin == FALSE) {
header("Location: login.php");
}
?>
Something along those lines.
>>> "Tyler Durdin" <[EMAIL PROTECTED]> 07/26/02 03:28PM >>>
alrigh I have switched everything over to the $_Session['variable'] style of
session. Next question, I have a little script that used to check if the
session was registered and if it was not it would redirect to the login
page. How do i accomplish this now that i cannot check if the session is
registered? Here is what i have.
<?
session_start();
if (session_registered("valid_user2')) {
echo " you are registered";
} else {
header("Location: http://loginpage.com");
}
?>
How do I check if a session is active/registered or whatever it is so i cn
still redirect or assign variables?
_________________________________________________________________
Join the world's largest e-mail service with MSN Hotmail.
http://www.hotmail.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php