I'm attempting to have the last_login field updated with the date and time when an admin logs in. Not quite sure what is wrong.
$date = time();
// inbetween here, I'm deleting the number of attempts, which seems to work. I added 2 in manually via cpanel and ran the script and checked. The attempts were gone.
$sql = "UPDATE $admin_table SET last_login = '$date' WHERE username = '$myusername'";
$result = @mysql_query($sql) or die(mysql_error());
echoing $date works 1322590641
echoing $result yields 1
echoing $sql looks like it's right, it just isn't entering the info for some reason.
The mysql field last_login is set for timedate type.
Any thoughts?
Thanks!
[edited by: Gilead at 6:22 pm (utc) on Nov 29, 2011]