Hi
I've the following problem:
Script 1 (sess2.php):
<?php
session_start() ;
session_registe r('myReg');
$myReg = "Hello";
header("Locatio n: test.php",FALSE );
exit();
?>
Script 2 (test.php):
<?php
session_start() ;
$mySessId = session_id();
echo "SessId_Tes t = $mySessId <br>";
$value = $_SESSION['myReg'];
echo "myReg = $value <br>";
?>
If i invoke sess2.php the first time (in a new browser) i receive the
following result:
SessId_Test = a729c9ae3dc91a0 b25b41ab4ab4922 16
myReg =
if i invoke sess2.php the second time (in the same browser) :
SessId_Test = a729c9ae3dc91a0 b25b41ab4ab4922 16
myReg = Hello
Have someone an idea, why the session var is only the second time available?
Regards, Michael
I've the following problem:
Script 1 (sess2.php):
<?php
session_start() ;
session_registe r('myReg');
$myReg = "Hello";
header("Locatio n: test.php",FALSE );
exit();
?>
Script 2 (test.php):
<?php
session_start() ;
$mySessId = session_id();
echo "SessId_Tes t = $mySessId <br>";
$value = $_SESSION['myReg'];
echo "myReg = $value <br>";
?>
If i invoke sess2.php the first time (in a new browser) i receive the
following result:
SessId_Test = a729c9ae3dc91a0 b25b41ab4ab4922 16
myReg =
if i invoke sess2.php the second time (in the same browser) :
SessId_Test = a729c9ae3dc91a0 b25b41ab4ab4922 16
myReg = Hello
Have someone an idea, why the session var is only the second time available?
Regards, Michael
Comment