davidcriniti Posted August 26, 2014 Share Posted August 26, 2014 I'm making an amendment to my login page so that when a user logs in, the date_last_login field in the members table is updated to NOW(). Well, that's the idea. The login works fine. Always has. It's just this update that isn't happening. No error message appears, but date_last_login remains 0000-00-00 00:00:00 . Any tips? $sql_date_last_login = $pdo->exec("update members set date_last_login = now() where member_id = '".$SESSION['member_id']."'"); Cheers, Dave Quote Link to comment Share on other sites More sharing options...
Solution davidcriniti Posted August 27, 2014 Author Solution Share Posted August 27, 2014 Oops, found the error: (Missing "_" in $_SESSION) $sql_date_last_login = $pdo->exec("update members set date_last_login = now() where member_id = '".$_SESSION['member_id']."'"); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.