I'm sorry if this is a very simplistic question but I'm still learning the ropes of PHP.
I'm writing a mail script in PHP that takes the contents of a form and sends it out to one of two emails. I had it working perfectly but the person for whom I'm creating it came back with some edits and now I'm struggling.
Essentially, there are two sets of radio button where if "Yes" is checked another "additional information" field also needs to be filled in. If "No" is check, the other field can remain blank.
This is what I have so far:
if ($var1 == "String" AND $var2 =="")
{
echo("Fill in the blah field");
}
elseif ($var3 == "Yes" AND $var4 == "")
{
echo ("Fill in the blah blah field");
}
elseif ($var1 !="" AND $var2 !="" AND $var7 !="")
{
mail(....)
echo(....)
}
I know there has to be a better way to first check if one set validates, then if the other does, and then if all the required fields are filled in.... Currently when I submit the form all I get is a blank screen.
Thanks for your help!