PHP: Hide error reporting only if $var returns false.?

/-=GT=-\

New member
if(!$conn){
die (error_reporting(E_ERROR | E_PARSE)"Failed to connect to mySQL server."));

I'm trying to get it so that if $conn // connection to mysql server
isn't made, that it dies and prints "Failed to connect to mySQL server." but also doesn't display any warnings. (only for that variable I don't want the whole page to not report.)
 
Back
Top