How come checkbox state is not always passed along to PHP script?

后端 未结 4 954
孤城傲影
孤城傲影 2020-12-01 14:54

I have an HTML form:

Check me!
4条回答
  •  长情又很酷
    2020-12-01 15:13

    Unfortunately, that's how the spec for checkboxes in submitted forms works - if the checkbox isn't checked, the browser doesn't necessarily send that field at all.

提交回复
热议问题