Hi All,
I have a problem with PHP not remembering sessions. for example:
in page1.php:
<? session_start();
$_SESSION["var"] = "Please help"; ?>
<form action="sessionTest2.php" method=post>
<input type="text" name="loopCount" size="21", maxlength="20"></td>
<input type="submit" value="Submit"></td>
in page2.php
<? session_start();
echo $_SESSION["var"];
echo $_POST["loopCount"];
?>
what I see above is only data for loopCount. I am not able to see the "Please help" on
page2
I noticed that 2 cookies were created one for each session start. When I opened one of
the cookies, I noticed that the data "Please help" was in the session cookie. Somehow
php thinks a session is not already created and starts a new session on page2.php.
my php.ini file has:
register_globals = off
session.use_cookies = 1
session.use_only_cookies = 1
session.auto_start = 0
session.gc_maxlifetime = 1440
Please can someone help me. I am not sure what I am doing wrong? Maybe it is some
configuration that is causing this issue. Any help appreciated.
Thanks,
moiz
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php