I am adding an array of elements from the form, and if they are all empty, I want to do some checking and add errors to the line. So I:
$array = array( 'RequestID' => $_POST["RequestID"], 'ClientName' => $_POST["ClientName"], 'Username' => $_POST["Username"], 'RequestAssignee' => $_POST["RequestAssignee"], 'Status' => $_POST["Status"], 'Priority' => $_POST["Priority"] );
And then, if all elements of the array are empty, do:
$error_str .= '<li>Please enter a value into at least one of the fields regarding the request you are searching for.</li>';
arrays php validation
Matt Feb 18 '11 at 11:37 2011-02-18 11:37
source share