Session not working in FireFox
Posted: Wed Oct 29, 2008 12:10 am
Hi all ..
I am trying to develop a web site where for each of the page, i am trying to check if the user is logged in using session. Here is a sample code for checking if the user is logged in..
It all works fine with IE and Chrome but the session doesnt seem to work in Firefox version 3.0.3. Even when the user logs out, it still gives access to the pages where i am checking for an authentication.
Can anyone help me fix this problem?? if i am not clear .. please post the same.
I am trying to develop a web site where for each of the page, i am trying to check if the user is logged in using session. Here is a sample code for checking if the user is logged in..
Code: Select all
<?php
if(!isset($_SESSION))
{
session_start();
}
//see if the user is authenticated
if($_SESSION['authenticate']!="1")
{
session_regenerate_id();
session_destroy();
include_once("Login_templ_start.php");
echo '<FONT COLOR="#FF0000 "><b>Unauthorized login.. Please Login again</b></FONT>';
include "loginbody.php";
include "template_end.php";
exit();
}
//further code of the page..
?>
It all works fine with IE and Chrome but the session doesnt seem to work in Firefox version 3.0.3. Even when the user logs out, it still gives access to the pages where i am checking for an authentication.
Can anyone help me fix this problem?? if i am not clear .. please post the same.