-5

我不知道为什么我会收到这个错误我认为我有足够的定义参数?!有什么帮助吗?

if ($insert_stmt = $mysqli->prepare("INSERT INTO members (username, email, password, salt, privilegio) VALUES ('".$username."','".$email."','".$password."','".$salt."','".$privilegio."')")) {    
   $insert_stmt->bind_param('sssss', $username, $email, $password, $random_salt, $privilegio); 
   // Execute the prepared query.
   $insert_stmt->execute();
}
4

1 回答 1

0

应该

if ($insert_stmt = $mysqli->prepare("INSERT INTO members (username, email, password, salt, privilegio) VALUES (?,?,?,?,?)") {    
   $insert_stmt->bind_param('sssss', $username, $email, $password, $random_salt, $privilegio); 
   // Execute the prepared query.
   $insert_stmt->execute();
}
于 2013-07-22T02:52:04.123 回答