检查是否填写了任何字段 [英] Check if any fields are filled in
问题描述
我正在创建一个提名页面,如果有任何字段填写,我想通过
通过,但如果没有填写,则
消息将会出现。我不能在多个
字段上进行检查。
这是我所拥有的:
if ($ nominee_first_name!==''''&& $ nominee_middle_initial!==''''&&
$ nominee_last_name!=='''')
如果所有字段都有内容,页面都会通过,那么我所关心的是至少有一个输入的内容
字段。
nominee_first_name!==''''&&
< blockquote> nominee_middle_initial!==''''&&
nominee_last_name!=='''')
会发生的是,如果所有字段都有内容,则页面会通过,而且我关心的是至少有一个
字段中输入的内容。
I am creating a page for nomination and want to let the information
pass if any field are filled out, but if none are filled out, a
message will appear. I can''t get the check to happen on multiple
fields though.
Here is what I have:
if ($nominee_first_name !=='''' && $nominee_middle_initial !=='''' &&
$nominee_last_name !=='''')
What happens is that if all fields have content, the page passes, and
all I care about is that there is something entered in at least one
field.
nominee_first_name !=='''' &&
nominee_middle_initial !=='''' &&
nominee_last_name !=='''')
What happens is that if all fields have content, the page passes, and
all I care about is that there is something entered in at least one
field.
这篇关于检查是否填写了任何字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!