This question already has an answer here:
Sorry to all if this code is poor as I am just following through a book to and modifying it for my school project as I just started php less than a month ago.
I am trying to understand what this validation mean but can't seem to comprehend it full as I am new with php.
Code:
if (preg_match ('/^(\w*(?=\w*\d)(?=\w*[a-z])(?=\w*[A-Z])\w*){6,20}$/', $_POST['pass']) ) {
//$p = mysqli_real_escape_string ($dbc, $_POST['pass']);
$p = $_POST['pass'];
$sticky_password = $p;
} else {
$error['pass'] = 'Please enter a valid password!';
}
Any help would be really appreciated! Thanks!
Thank you very much.. :)
</div>