MrFish Posted July 10, 2009 Share Posted July 10, 2009 I'm adding a last login feature for my site, but the last_login field won't update when I run the login script. Everything else turns out ok. My code looks like this- mysql_select_db('b17_3648160_maindb', $con) or die(mysql_error());$lastlogin = date("y-m-d h:i a");$query="UPDATE users SET last_login='$lastlogin' WHERE username='$username'";$run=mysql_query($query); The database looks like this-I think it might be a timestamp error. I'll keep trying.edit: it was a timestamp error ._. Link to comment Share on other sites More sharing options...
Synook Posted July 11, 2009 Share Posted July 11, 2009 By the way you should hash your passwords so that even if someone hacks your DB they can't find out the passwords. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.