Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created February 12, 2018 23:50
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/9fdebaf17f998cc1c1c101c816fa4f46 to your computer and use it in GitHub Desktop.
Save parzibyte/9fdebaf17f998cc1c1c101c816fa4f46 to your computer and use it in GitHub Desktop.
<?php
if(!isset($_GET["id"])) exit();
$id = $_GET["id"];
include_once "base_de_datos.php";
$sentencia = $base_de_datos->prepare("DELETE FROM personas WHERE id = ?;");
$resultado = $sentencia->execute([$id]);
if($resultado === TRUE) echo "Eliminado correctamente";
else echo "Algo salió mal";
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment