Hi,
I have a strange problem.
Once a user logs in Iam validating the username and password
in a file 'validate.php'.If sucessful Iam redirecting to anotherpage else showing bad login.
In validate.php Iam storing the users details (like login name,IP Address,etc) in a table.
The problem is this insert query is executing twice(only on few machines)
What is the problem??
CODE SAMPLE
$query = "SELECT * FROM accounts where login_name='$login' and
password='$pass'";
$result = mysql_query ($query) or die ("Query failed");
$row=mysql_fetch_array($result);
$cnt=mysql_num_rows($result);
if($cnt!=0) //IF VALID USER
{
//START SESSION
//STORE USER DETAILS IN A TABLE
//THEN REDIRECT TO NEXT PAGE
}
else
{
//BACK TO LOGIN PAGE
}
In 'If' there is insert query which is executing twice.?
Any suggestions??
Thanks in Advance
-Ajay