prepare("SELECT * FROM users WHERE token = :token"); $CheckAccount->bindParam(':token', $GET_SESSION_TOKEN); $CheckAccount->execute(); $CheckAccountCount = $CheckAccount->rowCount(); if ($CheckAccountCount !== 1) { exit('Error: no token'); // Note: Using "exit" to stop execution after displaying the error message. } while ($CheckData = $CheckAccount->fetch()) { $access = $CheckData['access_level']; } if ($access == "0") { header('Location: /anasayfa.php'); exit(); } if (isset($_POST['account'])) { $id = $_POST['accountid']; $sql = "DELETE FROM users WHERE uid=?"; $stmt = $db->prepare($sql); $stmt->execute([$id]); header('Location: /kullanicilar.php'); exit; }