Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created Oct 14, 2019
Embed
What would you like to do?
<?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