PDO::ERRMODE_WARNING, PDO::ATTR_PERSISTENT=>PERSISTENT]); }catch(PDOException $e){ die('No Connection to MySQL database!'); } session_start(); $user=check_login(); $msg=''; if($_SERVER['REQUEST_METHOD']==='POST'){ if(!isset($_POST['pass']) || !password_verify($_POST['pass'], $user['password'])){ $msg.='
Wrong password.
'; }else{ $stmt=$db->prepare('INSERT INTO del_account (onion) VALUES (?);'); $stmt->execute([$user['onion']]); session_destroy(); header('Location: login.php'); exit; } } header('Content-Type: text/html; charset=UTF-8'); echo ''; echo 'This will delete your account and all data asociated with it. It can\'t be un-done. Are you sure?
'; echo $msg; echo ''; echo ''; echo ''; ?>