|
Found out it is a re-direct issue that cause the session value to be lost.
The code below works.
So in login.php you have this.
session_start();
....
...
$_SESSION['MyName'] = mysql_result($rs, 0, "name");
header("Location: newpage.php?PHPSESSID=".session*_id());
// without including PHPSESSID you will loose the value in MyName
Then in newpage.php the code looks like this
<?php
session_id($_GET['PHPSESSID']);
session_start();
// by setting the sessionID it works.
|