I have a enrollment form where users have to input there address. I am using PHP for validation and currently I check to make sure the field is not empty. Here is my code:>
if (empty($_POST['address']) || strlen(trim($_POST['address']))==0){
$msg = 'You must enter an address' ;
}else {
$address = mysqli_real_escape_string($dbc, strip_tags(trim($_POST['address']))) ;
}