开发者

sticky checkbox

Ii am trying to make a checkbox (to send via email) sticky.

To make sure it doesn't make a problem when sent empty I used the following:

<input type="checkbox" name="something" value="1">

<input type="hidden" name="something" value="0">

I have used things such as:

<input type="checkbox" name="something" value="1" <?=(($_POST['something']=='1')?'checked="checked"':'')?>>

But 开发者_如何学JAVAit does not work. Can someone please help me? Many thanks Francesco


One could interpret that sticky means that user cannot uncheck the checkbox. That would be achieved using disabled="disabled" attribute.

As a side note, however, it wouldn't be very polite to force people to subscribe to some email list...


Do you mean checked? If so then it would be

<input type="checkbox" name="something" value="1" checked="checked" />

Hope I understood that correctly

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜