I was looking through the forums and managed to find this useful script for password confirmation
if($_POST['password']!==$_POST['passwordconfirm']) {
echo "Your passwords did not match";
exit;
} else {
// success page here
}
Do i have to have create a field to store the ‘passwordconfirm’ variable in my database as well?
Here is snippet of my coding
repassword=$repassword
if($PASSWORD!=$repassword) {
echo "Your passwords did not match";
exit;
}
I declared ‘repassword’ as a variable to be checked against ‘PASSWORD’. And if it fits, only ‘PASSWORD’ will be stored.
I’m not sure if i got it right
Please advise.
Thank you