Let\'s say you have a form with pre-populated data from your database, and you allow your users to make changes and save the form. If the user clicks the save button without mak
Variation 1:
mysql_query() or die('error');
Variation 2:
$conn = mysql_query(); if(!$conn) {//Error code here}
Variation 3:
try { $conn = mysql_query(); if (!$conn) throw new Exception("mysql Error"); } catch(Exception $e) { echo $e->getMessage(); }