MrFish Posted July 10, 2009 Report Share Posted July 10, 2009 (edited) 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 ._. Edited July 10, 2009 by MrFish Link to comment Share on other sites More sharing options...
Synook Posted July 11, 2009 Report 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
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now