<?php
include_once("includes/checkerfun.php");

 $errors = "";

function ProperCheck(){
    // prop_username
    // prop_serial_number
    // btn_prop_search
 if(isset($_POST['btn_prop_search'])){
    if(empty(test_input($_POST['prop_username']))){
        $errors = "<p class='alert alert-danger text-center mt-3'>Property Username is Required!</p>";
    }elseif(empty(test_input($_POST['prop_serial_number']))){
        $errors = "<p class='alert alert-danger text-center mt-3'>Property Serial Number is Required!</p>";
    }elseif(strlen($_POST['prop_serial_number']) > 13 || strlen($_POST['prop_serial_number']) < 13){
        $errors = "<p class='alert alert-danger text-center mt-3'>Serial Number is Invalid and Must be 13 Digits!</p>";
    }elseif(!is_numeric(test_input($_POST['prop_username']))){
        $errors = "<p class='alert alert-danger text-center mt-3'>Serial Number must be a number!</p>";
    }else{
        $errors = "<p class='alert alert-success text-center mt-3'>Property Search Successfully!</p>";
    }
       return $errors;
 }

//  echo $errors;
}

