Hi all,

We have a website for selling books, developed with HTML, PHP y MySQL.
In a certail page, where the website interacts with the database, in a few cases only part of the page is loaded, so the customer is not able to complete the purchase.

An example of the PHP code is:
$insert_quotation = "INSERT INTO `Quotations_DSStgo`(`QuotationID`, `Date`, `Status`, `CustomerID`, `BookID`, `ClassID`) VALUES ('NULL','NULL', '0', '$CustomerID','$Book_ID', '$ClassID')";
mysql_query($insert_quotation, $db_handle) or die(mysql_error());

My question is: in case of an error, how can I keep the code but send the error message information to a log in order I am able to see what is happening?
I think the problem is in certain cases an error happens and "die", but I do not have information about the error, so I am unable to solve it.

Thanks a lot!!!!
Sir_Arcturus