Hi guys, always a big thanks for your input. Really appreciate as always.

Ok my issue today is with the password_hash function which randomly generate a salt before encryption.

I am creating a user registration form...i need to protect the password before it is saved to the database when user registerss.

I have already visited the PHP manual here

But since i am a newbie in PHP i have no idea how to change my code to apply this function.

I am going to attach it here below. Please have a look and let me know how to proceed...Thanks.

<?php require_once('Connections/bankusers.php'); ?>


// table name

// Random confirmation code

// values sent from form

// Insert data into database
$sql="INSERT INTO $tbl_name(confirm_code, FirstName,LastName,Email,UserName,Password)VALUES('$confirm_code','$FirstName','$LastName','$Email','$UserName', '$Password')";
mysql_select_db($database_bankusers, $bankusers);

I think i solved my own problem lol...as usual.All i did was add this :

$Password= password_hash($unhashedPassword, PASSWORD_DEFAULT);