A quick reference guide for PHP programmers
$dblink = new mysqli('127.0.0.1', 'username', 'pass', 'dbname', 3306); if ($dblink->connect_error) { echo "Error connecting to database"; trigger_error("Couldn't connect to database with error " . $dblink->connect_error); }