Simple PHP Error [closed]

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.";

Browse More Popular Posts

Leave a Comment