$_SESSION not working??? Please HELP!!!
From: garth15 (garth_r_jones_at_hotmail.com)
Date: 02/27/04
- Next message: Shawn Wilson: "Re: refresh"
- Previous message: Markus Ernst: "Re: PHP does not write full HTML code randomly"
- Next in thread: laidbak69_at_hotmail.com: "Re: $_SESSION not working??? Please HELP!!!"
- Reply: laidbak69_at_hotmail.com: "Re: $_SESSION not working??? Please HELP!!!"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 27 Feb 2004 09:12:41 -0800
I have two test files called index.php and index2.php.
Index.php:
<?php
session_start();
$_SESSION['sess_var'] = "hello world";
?>
<a href="index2.php">click</a>
-------------------------------------------------------------------------------
Index2.php:
<?php
error_reporting(E_ALL);
session_start();
echo $_SESSION['sess_var'];
?>
Index2.php does not display anything?!?! Any ideas??
I look at the session cookie and it has been set with the following
inside it:
sess_var|s:11:"hello world";
When I placed the line:
error_reporting(E_ALL);
in index2.php I got the following error:
Notice: Undefined index: sess_var in c:\program files\apache
group\apache\htdocs\index2.php on line 5
line 5 is:
echo $_SESSION['sess_var'];
- Next message: Shawn Wilson: "Re: refresh"
- Previous message: Markus Ernst: "Re: PHP does not write full HTML code randomly"
- Next in thread: laidbak69_at_hotmail.com: "Re: $_SESSION not working??? Please HELP!!!"
- Reply: laidbak69_at_hotmail.com: "Re: $_SESSION not working??? Please HELP!!!"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|