'.$error.'

'; }elseif(!isset($_POST['pass']) || !password_verify($_POST['pass'], $user['password'])){ $msg.='

Wrong password.

'; }else{ $stmt=$db->prepare('UPDATE users SET todelete=1 WHERE id=?;'); $stmt->execute([$user['id']]); session_destroy(); header('Location: login.php'); exit; } } header('Content-Type: text/html; charset=UTF-8'); print_header('Delete account'); ?>

This will delete your account and all data asociated with it. It can't be un-done. Are you sure?

Enter your account password to confirm

No, don't delete.