PLATFORM
  • Tails

    Create websites with TailwindCSS

  • Blocks

    Design blocks for your website

  • Wave

    Start building the next great SAAS

  • Pines

    Alpine & Tailwind UI Library

  • Auth

    Plug'n Play Authentication for Laravel

  • Designer comingsoon

    Create website designs with AI

  • DevBlog comingsoon

    Blog platform for developers

  • Static

    Build a simple static website

  • SaaS Adventure

    21-day program to build a SAAS

Question By
Unsolved

PHP Login script

tom-tom

Nov 20th, 2016 08:13 AM

Hi,

I am unable to register a user on the register.php. I'm getting this error:

Notice: Only variables should be passed by reference in F:\wamp64\www\login\register.php on line 14

This is my line 14:

$stmt->bindParam(':password', password_hash($_POST['password'], PASSWORD_BCRYPT));
mark

Nov 27th, 2016 11:34 AM

Try change it to this

$password = password_hash($_POST['password'], PASSWORD_BCRYPT);
$stmt->bindParam(':password', $password);