How do I write php code to check if checkbox is checked or not? -
how write php code check if checkbox checked or not ? if checkbox selected yes
value stored in database, , if checkbox not selected, no
valued stored in database. how that? know how connect database etc.
<input type="checkbox" name="cb1" value="yes" /> $cb1 = ($_post['cb1'] == 'yes')?'yes':'no';
if checkbox not clicked value null i.e. variable $_post['cb1'] not set.
Comments
Post a Comment