I have implemented this by I am getting an error, I can't figure out whats wrong
<?php
require 'config.php';
$mysqli = new mysqli($dbhost, $dbusername, $dbpass, $dbname);
$query = "UPDATE dataentry SET riskCategory = ?, " .
"EventAccidentSubject = ? , " .
"description = ? , " .
"peopleInvolved = ? , " .
"hazards = ?, " .
"address = ?, ".
"lat = ?, " .
"lng = ?, " .
"caseStatus = ? " .
"WHERE id = ?";
$stmt = $mysqli->prepare(query);
$stmt->bind_param("s", $riskCategory);
$stmt->bind_param("s", $EventAccidentSubject);
$stmt->bind_param("s", $description);
$stmt->bind_param("s", $peopleInvolved);
$stmt->bind_param("s", $hazards);
$stmt->bind_param("s", $address);
$stmt->bind_param("i", $lat);
$stmt->bind_param("i", $lng);
$stmt->bind_param("s", $caseStatus);
$stmt->bind_param("s", $id);
$stmt->execute();
$stmt->close();
$mysqli->close();
$link = $_SERVER['HTTP_REFERER'];
header("Location: $link");
?>