This is very strange ..
I have a SQL query to put a user's name , his IP , and a timestamp in a table called "Visit Log's" , but it's not working ..
But the query above it ( Update user table for timestamp) works.
Please help me check and see the problem.
$_SESSION['sl'] = true;
$sl=true;
session_register("sl");
$last_logged = date("Y-m-d H:i:s");
$qry = "update $tb_users set last_logged = '$last_logged' where id = '$my_id'";
$res = mysql_query($qry) or die(mysql_error());
$ip = $REMOTE_ADDR;
$qry = "insert into $tb_visit_logs (id, username, userid, logdate, ip) values ";
$qry .= " ('' , '$username', '$my_id', '$last_logged', '$ip')";
$res = mysql_query($qry) or die(mysql_error(""));
}
The first qry , update $tb_user's works fine , but the second one to insert data into the visit log's wont work .. Can someone help?