I have a form, and one input is amount. I want to开发者_开发问答 be able to use 0 as a price, but if I use zero, I get an error as set by me that I cannot leave the input blank.
The field is set as int(10).
Thanks
Post your code for validating the field. You may want to use !==''
or isset()
instead of empty()
or if($_POST[val])
You can use -1 for the default value that represents no amount entry.
精彩评论