I have been investigating in this forum and in others for some time, and I can not find out how in the present list I am working with, I can delete the record, but first ask if I am sure. I'm doing it this way:
echo "<script>
function Borrar()
{
confirm('Estas Seguro que deseas Borrar este Registro?');
}
</script>";
Then where do I call the function:
echo "<td align='center' class='borrar'><a onclick='Borrar()' href='borrar_estudiante.php?id=$estudiante[cedula]'><img src='../imagen/delete.png'></a></td>";
The message appears fine, but if I give cancel it goes to the next page, having deleted that record. In other words, if I accept or cancel, it will do the same.
I've tried other functions and if this does not happen, then it does not even look like the message.
It's something simple to do, but I hope you can help me.