I'm using MySQL. I want, if a connection error arises, show my own error message instead of the one from MySQL or PHP. How do I do that?
Thanks / Henrik
put an @ in front of the mysql function so it doesn't return an error, then use mysql_errno() to see if there was an error.
$resource = @("<SQL HERE>"); $error = mysql_errno($resource);
if ($error) { echo "There was an error"; }
thanks!