Hello all,
I am using sessions to authenticate users and to store their information (username n password).
login_pro.php page:
and in my others pages i check if a session variable exist else i redirect the user to the login page
setup.php page:
if the user has not login through the login page, then he will not be able to view the other pages and will be redirected to
pcclogin.php. This works perfectly fine in IE but not in firefox!! I can visit the other pages even if i have not login. I think that in firefox it stores the sessions..sumth ing like that..
so what do i need to do to make it work in firefox too??? i have tried using session_registe r but still it does not work in firefox! plzz help
I am using sessions to authenticate users and to store their information (username n password).
login_pro.php page:
Code:
<?php session_start(); include("db_connect.php"); $Rs=mysql_query("SELECT Pcc_username,Pcc_password,Pcc_fname,Pcc_lname FROM pcc WHERE Pcc_username='$pcclog' AND Pcc_password='$pccpwd'"); $count=mysql_num_rows($Rs); if($count==1){ $_SESSION['username']=$_POST["txt_plogin"]; $_SESSION['password']=$_POST["txt_pwd"]; $row=mysql_fetch_array($Rs); ?> html.. etc
setup.php page:
Code:
<?php session_start(); if ((!$_SESSION['username']) || (!$_SESSION['password'])){ header ('Location: pcclogin.php'); } ?> html... etc
pcclogin.php. This works perfectly fine in IE but not in firefox!! I can visit the other pages even if i have not login. I think that in firefox it stores the sessions..sumth ing like that..
so what do i need to do to make it work in firefox too??? i have tried using session_registe r but still it does not work in firefox! plzz help
Comment