Handling errors and continuing execution in PHP script -
i don't want "die()" when concerns small part of script , tried:
$result = mysql_query($sql) or echo("error responses");
but generated error. how give out error message , continue execute rest of script since if fails connect, rest should not affected.
$result = mysql_query($sql); if(mysql_error()) { echo "error: " . mysql_error(); }
Comments
Post a Comment