我正在尝试创建一个数据库,到目前为止还不错。尽管我似乎遇到了一个找不到答案的问题。我希望你们能让我重新上马。
问题在于登记部分;这是错误。
注意:尝试在第53行的/applications/xampp/xamppfiles/htdocs/swiftappandmysql/db/mysqldao.php中获取非对象的属性
致命错误:/applications/xampp/xamppfiles/htdocs/swiftappandmysql/db/mysqldao中未捕获的异常“exception”。php:53 stack 跟踪:#0/applications/xampp/xamppfiles/htdocs/swiftappandmysql/scripts/registeruser.php(40):mysqldao->registeruser('email1','aske','meyer','3a2a3b51b4da4d6…','8w\xaf:\xc6>\xeb\xa5\x10q\x85b\xc7\xfan…')#1{main}在第53行的/applications/xampp/xampfiles/htdocs/swiftappandmysql/db/mysqldao.php中抛出'
mysql数据库line:53
public function registerUser($email, $first_name, $last_name, $password, $salt)
{
$sql = "insert into users set email=?, first_name=?, last_name=?, user_password=?, salt=?";
$statement = $this->Conn->prepare($sql);
if(!$statement)
throw new Exception($statement->error);
$statement->bind_param("sssss", $email, $first_name, $last_name, $password, $salt);
$returnValue = $statement->execute();
return $returnValue;
}
以及寄存器用户行40:
$result =$dao->registerUser($userEmail, $userFirstName, $userLastName, $secured_password, $salt);
暂无答案!
目前还没有任何答案,快来回答吧!