Query Error message posting to E-mail addressIn different situations sql query can generate error message and display it along with error number. But most of the time develops is not the user of the script and for a normal user these error message or error number are of no use. The programmer can interpret meaning full reason of the error. So instead of displaying the error message to the visitor this script can post the error message and error number generated out of query to the email address of the programmer. We will use this small php mail script to post the error message to the programmer.
php if else condition to check the status of this mysql_query() function. Here is the small code.
PHP and PDOIf you are using PDO then we can collect error message and error code then post it by using PHP mail function.
This article is written by plus2net.com team.
More on PHP MySQL functions