开发者

Accepting zero as a value

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜