!db_connect - or die which is better

ceciliaviolet

New Member
really quick question please look at the following example \[code\]$dbConnect = mysql_connect($host , $username , $password) or die ("BIT OF A PROBLEM PLEASE COME BACK LATER");\[/code\]is this a good way to do it or should I maybe use \[code\]$dbConnect = mysql_connect($host , $username , $password); if(!$dbConnect) { echo "COULD NOT CONNECT !!"; } else { echo "CONNECTED !!"; }\[/code\]If you could explain which way is best it would be a great help too.also to add I have error_reporting(0); setthanks
 
Top