몇 가지 이유가 있습니다.(PHP) 치명적인 오류 : 멤버 함수 bind_param()을 호출하십시오.
Fatal error: Call to a member function bind_param() on boolean in D:\xampp\htdocs\tuitioncentre\stud-editprofile_process.php on line 19
다른 프로세스에서 동일한 기능을 사용했지만 정상적으로 작동합니다. 나는 프로그래밍에 익숙하지 않다. 누가 도와 줄 수 있니?
미리 감사드립니다.
mysqli_prepare() returns a statement object or FALSE if an error occurred.
귀하의 오류는 당신의 오류가 있음을 알 수 있듯이 당신이 boolean
(FALSE)의 기능 bind_param()
를 호출하려고되고 있다고 말한다 :
<?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");
?>
누락 된',''student_fatherContactNo =? ' – Saty
Omg, 미안 해요. 나는 정말로 그것을 알아 차리지 못했다. 감사. – Skyzoria
또한,'$ _SESSION [ 'sess_user_id']'를 준비하는 것이 어떻습니까? – Qirel