<?php
session_start();
$config = parse_ini_file('../database_config.ini');
//Create Database connection
$connection = mysqli_connect('localhost',$config['username'],$config['password'],$config['dbname']);
if ($connection->connect_error) {
die('Could not connect to db: ' . mysql_error());
}
$stmt = $connection->prepare("INSERT INTO report (reportID, userID, description, address, postalcode, latitude, longitude)
VALUES(0, 007, 'Major fire', 'Jurong Point', 640724, 1.640724, 103.640724)");
$stmt->execute();
echo "Error:
";
print_r($stmt->error_list);
$stmt->close();
$connection->close();
?>
Error : Fatal error: Call to a member function execute() on boolean
Why does my prepare statement fail?