// Check for a password and match against the confirmed password:
if (strlen($trimmed['password1']) >= 10) {
if ($trimmed['password1'] == $trimmed['password2']) {
$p = password_hash($trimmed['password1'], PASSWORD_DEFAULT);
} else {
echo '<p class="error">Your password did not match the confirmed password!</p>';
}
} else {
echo '<p class="error">Please enter a valid password!</p>';
}