For some reason I'm getting.
Fatal error: Call to a member function bind_param() on boolean in D:\xampp\htdocs\tuitioncentre\stud-editprofile_process.php on line 19
I used the same function on the other process and it works fine. I'm pretty new to programming, can anyone help me?
Thank you in advance!
<?php
session_start();
$type = $_SESSION['sess_usertype'];
if(!isset($_SESSION['sess_user_id']) || $type!="1"){
header('Location: login.php?err=2');
}
include('db.php');
$data = $conn->prepare("UPDATE student INNER JOIN user ON student.student_nric=user.user_nric SET user_password = ?,
student_name = ?,
student_address = ?,
student_contactNo = ?,
student_fatherName = ?,
student_fatherContactNo = ?
student_motherName = ?,
student_motherContactNo = ?
WHERE student_nric = {$_SESSION['sess_user_id']}");
$data->bind_param('ssssssss',
$_POST['user_password'],
$_POST['student_name'],
$_POST['student_address'],
$_POST['student_contactNo'],
$_POST['student_fatherName'],
$_POST['student_fatherContactNo'],
$_POST['student_motherName'],
$_POST['student_motherContactNo']);
$data->execute();
$data->close();
header("Location: stud-dashboard.php");
?>