first time posting here and very new to PHP so bear with me. I have utilized a few sets of scripts I found on the interwebs for a PHP mail referral form I am deploying for a family members health service. It is currently working well validating fields and not allowing the form to be sent unless reCaptcha is returned true. Perfect so far
It's validating fields using a loop of if statements. However I would like it to either gather data from non mandatory fields or skip them. I have had issues using the
if (empty($variable)) {
continue;
}
If anyone can offer any assistance I would appreciate