我正在按照创建注册和登录系统的教程。我尽一切努力,但当我按下提交表单时,仍然出现奇怪的严格标准错误。严格的标准错误,同时保存注册数据
<?php
require 'pdoconnect.php';
$message = '';
if(!empty($_POST['email']) && !empty($_POST['password'])):
// Enter the new user in the database
$sql = "INSERT INTO users (email, password) VALUES (:email, :password)";
$stmt = $conn->prepare($sql);
$stmt->bindParam(':email', $_POST['email']);
$stmt->bindParam(':password', password_hash($_POST['password'], PASSWORD_BCRYPT));
if($stmt->execute()):
$message = 'Successfully created new user';
else:
$message = 'Sorry there must have been an issue creating your account';
endif;
endif;
?>
它说
严格的标准:只有变量应该通过线14(与密码哈希线)引用传递。
我已经找遍了解决方案,但我无法找到任何。
在使用'bindParam()'中的散列值之前,您应该对密码*进行散列* –