Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created October 14, 2019 21:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/7c0d02f9f77dcedd4e63f9ea5dd07254 to your computer and use it in GitHub Desktop.
Save parzibyte/7c0d02f9f77dcedd4e63f9ea5dd07254 to your computer and use it in GitHub Desktop.
<?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