Do you guys know when you submit a form via PHP, is the form checkbox value being treated as the string "true" or boolean true? Assuming my checkbox value attribute was set to "true".
1条回答 默认 最新
douhan1992 2011-11-05 23:14关注When you submit a checkbox, the value will be whatever you set the value attribute as, and will be a string when PHP parses the form data and populates
$_REQUESTand friends.If you don't specify a value in the form, then browsers default to
"on", not"true"(this is being made standard behaviour in HTML 5).本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报