I'm having a problem with session variables. A site that works fine on my
local system (PHP 4.3.4) is not working on the live server (4.1.2). In both
cases, register_globals is OFF. Every page starts with session_start() and
I'm setting session vars by simply assigning them to $_SESSION, eg:

   $_SESSION['message'] = "Some message for the next page";

I have a function that is included into every page that goes like this:

   function show_message() {
      if(isset($_SESSION['message'])) {
         echo $_SESSION['message'];
         unset($_SESSION['message']);
      }
   }

Calling tha function prints the message okay, but doesn't unset the session
var, so once the message is set, it shows on every subsequent page until
set to a different message. I even tried using
session_unregister($_SESSION['message']) even though the manual says not
to. What am I missing here?

-- 
@+
Steve

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to