I don't want to "die()" when it concerns only a small part of the script and I tried:
$result = mysql_query($sql) or echo("error with responses");
But it generated an error. How do I just give out an error message and continue to execute the rest of the script since even if it fails to connect, the rest should not be affected.
$result = mysql_query($sql);
if(mysql_error()) {
echo "Error: " . mysql_error();
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With