I've got this code that should delete a row, containing a certain number from the database.
if ( isset($_POST['textfield_numtodelete']) )
{
$numToDel = $_POST['textfield_numtodelete'];
$resdel = mysqli_query( $con,"DELETE FROM pncall_numbers WHERE Number = '$numToDel'");
if ( $resdel ) { echo ("<center>".$numToDel." deleted successfully.</center>"); } else { echo("<center>".$numToDel." not found in database.</center>"); }
}
If successful, it should output "deleted successfully", else "not found in database". Yet $resdel always is true, even if I try to delete a number that's not there...
Thanks!