For the HTML form below, what is the correct functioning script that checks the input “mail” to be sure it is filled before proceeding?

✅  The correct answer is:

if (!empty(\$\_POST[“mail”])) {
echo “Yes, mail is set”;
} else {
echo “No, mail is not set”;
} (correct)

Question:

For the HTML form below, what is the correct functioning script that checks the input “mail” to be sure it is filled before proceeding?

Solution:

  • if (!empty(\$\_POST[“mail”])) {
    echo “Yes, mail is set”;
    } else {
    echo “No, mail is not set”;
    } (correct)