I've a FORM that is filled out by a user/visitor on the webpage. I've added JavaScript to secure as much as possible, but really want to check even on the PHP side that there is DATA in the $_POSTs.
Is the below CODE correct? I want to accomplish that NONE of the POSTed fields are EMPTY, meaning that the fields in the FORM was submitted as BLANK.
if (empty($_POST["firstname"]) || empty($_POST["lastname"]) || empty($_POST["cellphone"]) || empty($_POST["email"]) {
header("Location: http://www.domain.com/error.php?ec=empty");
exit();
}