我正在尝试在 POST 中测试我的 php 文件,所以我收到了这个错误

问题描述 投票:0回答:0

它显示错误来自绑定,我真的不知道是什么问题,这个错误的解决方案是什么/

<?php

class DbOperation{

private $con;
function __construct(){

require_once dirname(__FILE__).'/DbConnect.php';
$db = new DbConnect();
$this->con = $db->connect();

}
function createUser($username,$pass,$email){
$password = md5($pass);
$stmt = $this->con->prepare("INSERT INTO `users` (`id`, `username`, `password`, `email`) 
VALUES (NULL, ?, ?, ?)");
$stmt->bind_param("sss",$username,$password,$email);

if ($stmt->execute()) {
            return true;
        } else {
            return false;
        }
    }

}

The screnshot fron POST

php mysql phpmyadmin postman
© www.soinside.com 2019 - 2024. All rights reserved.