[RESOLVED] DELETE return value
i have the following that i can delete my records with no problem but if you enter a records that doesnt exist then i need to be able to get a return value that tells the user you cant delete that cause it doesn't exist. with my SELECT statements or UPDATE i do $num=mysql_numrows($result); and test the vaule of $num, but i cant with the following
Code:
$query = "DELETE FROM WorkOrders WHERE id='$TicketNumber' AND siteid='$siteid'";
$result=mysql_query($query);
i want to be able to via the $result value see if the record even exist then i can tell the user that it either doesn't or it was deleted.
Re: [RESOLVED] DELETE return value
it's better to use headers than JavaScript if you want to redirect; you can always show the error message on the next page.
PHP Code:
// Redirect
header("Location: " . $url);