note 63275 rejected from function.session-start by nlopess
| From: | nlopess@php.net | Date: | Sat, 18 Mar 2006 12:41:22 +0000 |
| Subject: | note 63275 rejected from function.session-start by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-106024@lists.php.net to get a copy of this message | ||
Note Submitter: ajeya dot ub at gmail dot com
----
Hi,
I am currently working with sessions in PHP and Im stuck! Please help. My problem is,
On page1.php, I do this...
session_start();
$_SESSION['user']='abcd';
header("Location: page2.php");
exit();
On page2.php, I do this...
if (!isset($_SESSION['user']))
echo "session variable not set";
else
echo "session variable is" . $_SESSION['user'];
The output I see on page2.php is "session variable not set". Why is this?