我正在練習爲網站構建PHP註冊表單腳本。我已經完成了這個代碼,但是當我點擊提交按鈕時,我得到了通知:只有變量應該在第13行中通過引用傳遞,並且我堅持要在這裏做什麼。任何幫助非常感謝,再次我不是一個PHP專家。只有變量應通過引用傳遞...在線13失敗
<?php
require 'database.php';
if(!empty($_POST['email']) && !empty($_POST['username']) && !empty($_POST['password'])):
//Enter the new user into the database
$sql = "INSERT INTO users (email, username, password) VALUES (:email, :username, :password)";
$stmt = $conn->prepare($sql);
$stmt->bindParam(':email', $_POST['email']);
$stmt->bindParam(':username', $_POST['username']);
$stmt->bindParam(':password', password_hash($_POST['password'], PASSWORD_BCRYPT));
if($stmt->execute()):
die('Success');
else:
die('Fail');
endif;
endif;
?>
這裏
當你得到PHP錯誤很好的參考http://stackoverflow.com/questions/12769982/reference-what-does-this-error-mean-in-php – Terminus