Connection script now terminating."; exit(0); } if (!isset($dbUsername)) { echo "Database username is missing.
Connection script now terminating."; exit(0); } if (!isset($dbPassword)) { echo "Database password is missing.
Connection script now terminating."; exit(0); } if (!isset($dbName)) { echo "Database name is missing.
Connection script now terminating."; exit(0); } $db = mysqli_connect($dbLocation, $dbUsername, $dbPassword, $dbName); if (mysqli_connect_errno() || ($db == null)) { printf("Database connection failed: %s
Connection script now terminating.", mysqli_connect_error()); exit(0); } /* else { echo "Connected!\n"; mysqli_close($db); echo "Database closed!\n"; exit(0); } */ ?>