This question already has an answer here:
I am working on a membership script, and can't for the life of me figure out whats wrong with my query... anyone have any idea's? Think I need a second set of eyes.. Originally I was just sending
CODE EXCERPT :
//These variables are pulled from prior query
$id = $row['id'];
$hashed_password = $row['password'];
$username = $row['username'];
$joined = $row['join_date'];
$salt = $row['salt'];
$email = $row['email'];
//compare password pulled from database
if(password_verify($password,$hashed_password)){
$sqlquery2 = "UPDATE users SET lastvisit = now(), join_date = ".$joined." WHERE id = '" . $id ."'";
//$joined is equal to 2016-10-19 17:24:08
</div>
Please check whether your joined_date is a TIMESTAMP column. If so following will help you. http://dev.mysql.com/doc/refman/5.7/en/timestamp-initialization.html