$dbHost = 'localhost';
$dbName = 'test';
$dbUser = 'root';
$dbPassword = '';
$dataBase = new mysqli($dbHost, $dbUser, $dbPassword, $dbName);
$title = '123';
mysqli_query($dataBase, "INSERT INTO projects (`title`) VALUES ('$title')");
$dbHost = 'localhost';
$dbName = 'test';
$dbUser = 'root';
$dbPassword = '';
$dataBase = new mysqli($dbHost, $dbUser, $dbPassword, $dbName);
$title = '123';
$result = $dataBase->query("INSERT INTO projects (`title`) VALUES ('$title')");
if($result){
echo 'ok';
} else {
echo $dataBase->errors;
}