Okay, I have a new problem.

I have the following code that certain pages call when they first load:
Code:
   function doCommonPageLoad()
   {
      session_start();
      $isAuthorized = $_SESSION['isAuthorized'];
      if($isAuthorized == "")
      {
         $_SESSION['isAuthorized'] = "authorized";
         session_write_close();
      }
   }
The problem is that when I check the value of $_SESSION['isAuthorized'] later, it doesn't exist.

I read up some more on sessions and session variables and found a couple of others having the same problem here: http://us3.php.net/manual/en/functio...n-register.php
Two things that they mention:
1) Make sure you put session_start() at the beggining of your script.
2) Call session_start() before you write html, because once html has been outputed, session_start() can't use the header function to set cookies, hence session_start() fails and no session can be started.

So I checked that I'm not writing any html before calling doCommonPageLoad() and I call session_start() at the beginning of it. The documentation says that you are not supposed to use session_register() if you are accessing the session variables with $_SESSION['xxxx'].

Does anyone have any idea as to why $_SESSION['isAuthorized'] is not being saved in the session?