Ok I got trim and check sorted. I looked at the include source. But I cant get the confirm password function to work! >_<
confirm password function:
<?php
function confirm_password($formdata, $password1, $password2)
{
// Check that two passwords given match
// $formdata = Form Data Array
// $password1 = Name of first password field
// $password2 = Name of second password field
if ($formdata[$password1] === $formdata[$password2])
return true;
else
return false;
}
?>
<?php
This is the create_users.php version:
// check password and confirmation password match
if (!confirm_password($form_data, 'password', 'confirmpassword'))
{
$error = "Password and Confirm Password do not match";
return($error);
}
Any ideas to why the confirm function isnt working? thx.