PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I cannot seem to get this update working properly. I am trying to automatically update the user's last login date when they login successfully. This code is automatically executed if the user logs in successfully, but right now it is inserting a blank date into the db (0000-00-00 00:00:00).
mysql_select_db($database_connectionME, $connectionME);
$strQuery = "UPDATE userTable SET lastLogin=now() WHERE username='".$loginUsername."'";
mysql_query($strQuery) or die(mysql_error());