RE: [PHP-WIN] session - help

From: Date: Thu, 17 Apr 2003 07:24:12 +0000
Subject: RE: [PHP-WIN] session - help
Groups: php.windows 
Request: Send a blank email to php-windows+get-19463@lists.php.net to get a copy of this message
Well then there's your problem. Just add session_start() at the start of any page which uses session variables (BEFORE reading or writing them). Jill PS. Your original post was cross-posted to about three different lists. I have removed all of them except PHP-WINDOWS from this reply, as I do not wish my reply to appear on those other lists, of which I am not a member. -----Original Message----- From: Saravana Kumar S P [mailto:sps@gulfmd.com] Sent: Thursday, April 17, 2003 8:16 AM To: ODCS; PHP General Cc: PHP Windows Subject: [PHP-WIN] session - help Hi, Am just a beginner to PHP, jumping from ASP. I tried re-coding from my small ASP site. And the things worked fine until I met the login page. I store the user data in sessions and access then. The logging name, mail-id, userID are stored in session vars. I used this <?php $_SESSION ["MemberName"] = "Whatever"; $_SESSION ["MemberId"] = "Whatever"; $_SESSION ["MemberMail"] = "Whatever"; ?> to store the data on successful login attempt. The page redirects to home page after that. When I try to access the session var there... it gives a notice saying... the session variable is not defined?? How can I avoid that. I didnt do with session_start () or things like that... as we dont do that for in ASP. Thanks, SPS

« previous php.windows (#19463) next »