何らかの理由で私が手に入れている。(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をドキュメントページhttp://php.net/manual/en/mysqli.prepare.php 1として
<?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