session not persisting
Posted: Mon Dec 06, 2010 2:18 am
Chunk of the first page. I do have session_start(); at the top of this one too.
I do this and the session ends up empty. it's just 0 every time.
2nd page
I do this and the session ends up empty. it's just 0 every time.
Code: Select all
if(mysql_num_rows($result) > 0)
{
$_SESSION['login_name'] = $user_loginName;
echo $_SESSION['login_name'];
echo $result;
js_redirect('http://localhost/roomSplit/loggedIn.php',1); //Redirects to blogulate.com in 1 second.
}
else
{
echo("Wrong username/password.");
}
Code: Select all
<?php
session_start();
ini_set('display_errors',1);
error_reporting(E_ALL);
?>
<html>
<title>Panel</title>
<body>
<?php
echo("Welcome " + $_SESSION['login_name']);
?>
</body>
</html>