Is there a simpler function to something like this:
if (isset($_POST[\'Submit\'])) {
if ($_POST[\'login\'] == \"\" || $_POST[\'password\'] == \"\" || $_P
Something like this:
// Required field names
$required = array('login', 'password', 'confirm', 'name', 'phone', 'email');
// Loop over field names, make sure each one exists and is not empty
$error = false;
foreach($required as $field) {
if (empty($_POST[$field])) {
$error = true;
}
}
if ($error) {
echo "All fields are required.";
} else {
echo "Proceed...";
}