<?php

include 'conexion.php';
$id_campo=$_POST['id_campo'];

$consulta="delete from campos where id_campo = '".$id_campo."'";
$result = mysqli_query($conexion,$consulta) or die (mysqli_error());

if($result == true){
    echo "si";
}else{
    echo "Error al eliminar";
}

mysqli_close($conexion);

?>