Hi,
Thanks for you help. It still does not work on my system.
I looked into Cookies in the browser (I use Firefox). Under localhost, it shows localhost PHPSESSID. Session variable of $_SESSION["value"] isn't there. I thought all session variables are stored as cookies along with the session id until the session is destroied.
By the way, session variable is essentially an array....
User Profile
Collapse
-
PHP session variable problem
Hello,
I am using PHP 5, Apache on WinXP.
Here is the first php named 1.php
<?php
session_start() ;
$_SESSION[0] = 22 ;
echo $_SESSION[0];
?>
<a href="http://localhost/2.php"> 2php </a>
Here is second php named 2.php
<?php
session_start() ;
if (isset( $_SESSION[0]))
{echo 'set';}
else...
No activity results to display
Show More
Leave a comment: