I have attempted to use session_write_close() but it makes no difference. Thanks for your help. Any other ideas I might be be able to try? Upon doing a quick search using something like "$_SESSION second time" I see that there are a number of others who seem to have similar problems, and no solutions. -----Original Message----- Sent: Tuesday, August 17, 2004 7:08 AM Irm Jr wrote: > Each page checks for a particular session variable, if it isn't set to > a particular value, the intruder is kicked out to the login form and > asked to log in. > > The problem is this: > > On the production machine, even with a correct username and password > (i.e. a successful login), the user is ALWAYS kicked back out and > asked to log in. However, typing exactly the same information a > second time allows the user right in. You can tell that the first > attempt was successful because the script executes the header:Location > . Use session_write_close() before your header() redirection. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals - www.phparch.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php