php - Can we post Unchecked Radio Button value? -


i have situation need unchecked radio button value. possible send unchecked radio button value through form in php? if yes, can please explain?

<input type="hidden" name="myfield" value="false" /> <input type="checkbox" name="myfield" value="true" /> 

both fields have same name, if checkbox isn't checked, hidden field submitted, if checkbox checked, virtually override the hidden field.

on side note, sure radio buttons wouldn't better suited needs, able see definite answer each questions, whereas checkboxes more submitted selected checkboxes. failing assume checkboxes not submitted checked, assumed unchecked.


Comments

Popular posts from this blog

java - Last square of 8x8 grid not drawn, using two nested FOR loops -

What design pattern is this code in Javascript? -

javascript - Unusual behaviour when drawing lots of images onto a large canvas -