This is my query module, where I have the options to modify and delete , the problem I have is that when I click on the delete button only the message of the script "REGISTRATION ELIMINATED "But it does not really delete the data from my BD.
Thanks / Regards.
<?php
require("connect_db.php");
$sql=("SELECT * FROM ctg_turno");
//la variable $mysqli viene de connect_db que lo traigo con el require("connect_db.php");
$query=mysqli_query($mysqli,$sql);
echo "<table border='1'; class='table table-hover';>";
echo "<tr class='warning'>";
echo "<td>ID</td>";
echo "<td>Turno</td>";
echo "<td>Horas por Jornada</td>";
echo "<td>Actualizar</td>";
echo "<td>Eliminar</td>";
echo "</tr>";
?>
<?php
while($arreglo=mysqli_fetch_array($query)){
echo "<tr class='success'>";
echo "<td>$arreglo[0]</td>";
echo "<td>$arreglo[1]</td>";
echo "<td>$arreglo[2]</td>";
echo "<td><a href='actualizar_turno.php?idctg_turno=$arreglo[0]'><img src='images/actualizar.gif' class='img-rounded'></td>";
echo "<td><a href='turno_edit.php?idctg_turno=$arreglo[0]'><img src='images/eliminar.png' class='img-rounded'/></a></td>";
echo "</tr>";
}
echo "</table>";
extract($_GET);
if(@$idctg_turno){
$sqlborrar="DELETE FROM ctg_turno WHERE idctg_turno=$idctg_turno";
$resborrar=mysqli_query($mysqli,$sqlborrar);
echo '<script>alert("REGISTRO ELIMINADO")</script> ';
echo "<script>location.href='turno_edit.php'</script>";
}
?>