prepare("update users set active = '1' where email = ?" ); $upsql->bindValue(1,$link); $upsql->execute(); $checkwork = $dbh->prepare("select active from users where email = ?"); $checkwork->bindValue(1,$link); $checkwork->execute(); $row = $checkwork->fetch(); $active = $row['active']; //we only care if we can't activate! if ($active != 1){ echo ' there is a problem with your account. please contact us!'; exit(); } header ("Location: login.php?msg=success"); //lets activate !!! ?> Account activation