Forum Moderators: coopster
example. I can login to Index.php (via $_POST) and then when I try to navigate to the next page via hyperlink (all in the same tree/domain) it's as if I never logged in and all $_SESSION varialbes are gone.
any one seen this before?
print_r() displays information about a variable in a way that's readable by humans.
then on all pages have
$username=$_SESSION['username'];
unless I misunderstood your answer and you were just showing how to verify the session content!
but if that is the case you still did not show how you created the sessions
Basically
$SESSION['user']=$_POST['user'];
It's not my script, the script works on the server just fine. I think it has something to do with my localhost. I can upload all pages to my server (with godaddy) and it works great, but when I run it on my local host with XAMPP it won't carry the session variables from page to page.
I was wondering if someone had seen this before with XAMPP, maybe a Microsoft Upgrade messed something up?
print_r($_SESSION);
?>
and then you see that all session variables are good, but you can even go up to the address bar and click the same URL and it's like you never logged in. It's like you never started a session.