<?php
include('../includes/validador.php');
include('../conexiones/conex.php');
include('../includes/funciones.php');
	
$id = $_POST['id'];

try {
    $con->autocommit(FALSE);
    $sqlElim = "DELETE FROM persona WHERE Persona_id = '$id'";
    $con->query($sqlElim) or throw_ex(mysqli_error($con)); //si re registró bien

    $con->commit();
    echo 1;
    $con->close();
} catch (Exception $e) {  
    $con->rollback();
    echo 2;
    $con->close(); 
}

?>