我的php表单包含必填字段,但该消息不会让用户知道哪个字段尚未输入.我怎样才能做到这一点?
//if statement to check required fields
if ($name && $phone && $email && && $address && $city && $state && $zip && $month && $date && $year && $contact)...
//if some required fields were not filled out
echo "Please make sure you fill in all required fields<br>Click <a href=\"javascript:history.back(1)\">here</a> to return to our form.";
}
Run Code Online (Sandbox Code Playgroud)