Session variables not working
| From: | Andrew Wood | Date: | Fri, 14 May 2004 20:48:14 +0000 |
| Subject: | Session variables not working | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-186256@lists.php.net to get a copy of this message | ||
I'm trying to set the following two vars on one page then read their values on another like this:
page1.php...
ob_start();
session_start();
$_SESSION['member_id'] = $member_id;
$_SESSION['password'] = $password;
ob_end_flush();
page2.php...
ob_start();
session_start();
$member_id = $_SESSION['member_id'];
$password $_SESSION['password'];
ob_end_flush();
But on page2.php the variables are null. Can anyone help me out with this. I must be doing something really obvious wrong.
Thanks
AW