Try this:
$insert = mysql_query("Insert into DBNAME (Column1, Column2, Column3) Values (Value1, Value2, Value3)");
if (!$insert)
{
echo("<P>Something went wrong inserting following values: $value1, $value2, $value3 <BR>Error: mysql_error());
exit();
}