Question By
Unsolved

PHP Login script

tom-tom

Nov 20th, 2016 08:13 AM

<p>Hi,</p> <p>I am unable to register a user on the register.php. I'm getting this error:</p> <pre class="language-php"><code>Notice: Only variables should be passed by reference in F:\wamp64\www\login\register.php on line 14</code></pre> <p>This is my line 14:</p> <pre class="language-php"><code>$stmt-&gt;bindParam(':password', password_hash($_POST['password'], PASSWORD_BCRYPT));</code></pre>
mark

Nov 27th, 2016 11:34 AM

<p>Try change it to this</p> <pre class="language-markup"><code>$password = password_hash($_POST['password'], PASSWORD_BCRYPT); $stmt-&gt;bindParam(':password', $password);</code></pre>