Am trying to execute this function to post data to followup table
$ob=$_POST['ob'];
$update=$_POST['update'];
$updating_officer=$_POST['updating_officer'];
$update_date=$_POST['update_date'];
{
$query="insert into followup (ob,update,updating_officer,update_date) values(?,?,?,?)";
$stmt = $mysqli->prepare($query);
$rc=$stmt->bind_param('isss',$ob,$update,$updating_officer,$update_date);
$stmt->execute();
echo"<script>alert('Update on case $ob recorded successfully;</script>";
}
but this error shows up:
Fatal error: Uncaught Error: Call to a member function bind_param() on bool in C:\xampp\htdocs\ob\admin\update.php:17 Stack trace: #0 {main} thrown in C:\xampp\htdocs\ob\admin\update.php on line 17
WHat am i doing wrong