I was running an example from a mysqli tutorial.
$mysqli = new mysqli(\"localhost\", \"user\", \"password\", \"database\"); if($mysqli->connect_errno) { ech
You have to use this:
$mysqli=new mysqli("localhost","user","password") or die("........."); if($mysqli->query("Create database if not exists MyDB")){ "Failed creating new database: ".$mysqli->connect_errno(); die(); } $mysqli->select_db("MyDB"); $mysqli->close();