Created
October 14, 2019 21:46
-
-
Save parzibyte/7c0d02f9f77dcedd4e63f9ea5dd07254 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if (!isset($_GET["id"])) { | |
exit(); | |
} | |
$id = $_GET["id"]; | |
include_once "database.php"; | |
$statement = $database->prepare("DELETE FROM person WHERE id = ?;"); | |
$result = $statement->execute([$id]); | |
if ($result === true) { | |
echo "Deleted"; | |
} else { | |
echo "Something went wrong"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment