I've been using the same code to verify a persons login for more than a year - but I've been having some problems lately - I get past the login, but the session times-out after about 30 seconds or a minute. My new server is using PHP ver 4.3.3. I've also read the docs on "sessions" and I've taken their suggestion and have stopped using session_register("user_id"). I now use $_SESSION["user_id"]).
But, like I said after about a short minute, I get the following error message:
Notice: Undefined index: user_id in /home/pance/public_html/menu.php on line 13
If it's been working for a while on another server then I'd say it's purely to do with the error_reporting level on the new server.
I'm guessing the use of that index on line 13 is to check whether it is set. Ideally you'd change that check to use either the isset or empty functions. The alternatives are to suppress this particular error with the @ operator or lower your error_reporting level. Everything you need to make any of these changes is spelt out in detail in the manual.
-- Stuart
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php