0

here is my form :

<form action="Register.php" method="POST">
<input type="text" placeholder="Username" name="Username" >     
<input type="Password" placeholder="Password" name="Password">
<input type="Password" placeholder="Confirm Password" name="Confirm_Password">
<input type="submit">
 </form>

And here is the block that i'm having trouble with

if(!empty ($_POST['Username']) && !empty($_POST['Password'])); 


$sql ="INSERT INTO users (Username,Password) values (:Username, :Password)";
$stmt= $conn->prepare ($sql);
$stmt->bindParam (':Username', $_POST ['Username']);
$stmt->bindValue(':Password', password_hash($_POST ['Password'], PASSWORD_BCRYPT));

if ($stmt-> execute()  ):
    die('success');
    else: 

Please help ?

Mr_sang
  • 33
  • 7
  • `
    ` look at that very carefully; do you think that's valid? Then you're trying to pass by reference `password_hash($_POST ['Password']`.
    – Funk Forty Niner Oct 01 '16 at 21:35
  • ok... that was obvious but that is not the problem. I probably inserted that < while coping the code for this post. – Mr_sang Oct 01 '16 at 21:59

0 Answers0