You can only access one element at a time in an array. Change your code to something like
$username = $_POST['username'];
$bio = $_POST['bio'];
$service = $_POST['service'];
$age = $_POST['age'];
if (empty($username) || empty($bio) || empty($service) || empty($age)) {
echo "You forgot to fill in a field.";
}
else
echo "Passed.";
6
solved Simple PHP Error [closed]