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
$sqlquery2 = "UPDATE users SET lastvisit = now() WHERE id = '" . $id ."'";
but it was updating the joined_date column as well. So I tried this and broke it further.
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