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
$_REQUEST
and 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).本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报
悬赏问题
- ¥15 武汉岩海低应变分析软件,导数据库里不显示波形图
- ¥15 CreateBitmapFromWicBitmap内存释放问题。
- ¥30 win c++ socket
- ¥15 CanMv K210开发板实现功能
- ¥15 C# datagridview 栏位进度
- ¥15 vue3页面el-table页面数据过多
- ¥100 vue3中融入gRPC-web
- ¥15 kali环境运行volatility分析android内存文件,缺profile
- ¥15 写uniapp时遇到的问题
- ¥15 vs 2008 安装遇到问题