If I run this I get the following error:
Notice: Only variables should be passed by reference in /var/www/interface/register.php on line 11 Success
I dont know how to fix that. It's still successful and the data is hashed in the database, but I don't want this notice.
$sql = " INSERT INTO users (username, password) VALUES (:username, :password)";
$stmt = $conn->prepare($sql);
$stmt->bindParam(':username', $_POST['username']);
$stmt->bindParam(':password', password_hash($_POST['password'], PASSWORD_BCRYPT));
if ($stmt->execute()) :
die('Success');
else:
die('Fail');
endif;
Thanks in advance.