Hi all,
I am having problems with cookies ( as usual )
When a member logs in,after validating whether login details ares valid, i create cookies like this :
<?
include("ConnectToDataBase.php");
$query ="Select * from member where username = '$UserName' and password='$PASSWORD'" ;
$result =mysql_query($query);
$row =mysql_fetch_row($result);
$a = $row[2];
if ($a <> ""): // record exitst
// set cookie here
setcookie("mid", $row[0]);
setcookie("LoginID",$row[0]);
header("Location: HomePage1.php?m=$row[0]");
else :
// some login error message...
?>
It is working well.
When member logs out,
my code is like this :
<?
if ($mid<>""):
setcookie("mid");
setcookie("LoginID");
setcookie("Type");
setcookie("SubType");
setcookie("mid","");
setcookie("LoginID","");
setcookie("Type","");
setcookie("SubType","");
else :
$LoggedIn="No";
endif;
?>
// some messages
This also working well.
But when the user wants to log in again using diffrent login details ( valid login details) it doesnt work...
But he enter same login details in the same browser the login is successfull.
How to solve this problem????????
Please take your time out and reply,
Tnx,
Cheers,
Raghu