html - Check if one or multiple checkboxes is selected -



html - Check if one or multiple checkboxes is selected -

i have list of checkboxes signing newsletter saves multiple values.

when user selects 1 or multiple checkboxes need (hidden) checkbox selected automatically , saved database. problem don't know how automatically hiddensetting checkbox selected?

<div class="col-us-6 col-xs-3"> <div class="checkbox"> <label> <input type="checkbox" name="section[]" value="2317|2325|2333|2341|2349|2374|2399|2424"<?php if (@in_array(2317, $member_values['section'])) echo ' checked="checked"'; ?>> alternative 1 </label> </div> </div> <div class="col-us-6 col-xs-3"> <div class="checkbox"> <label> <input type="checkbox" name="section[]" value="2318|2326|2334|2342|2350|2375|2400|2425"<?php if (@in_array(2318, $member_values['section'])) echo ' checked="checked"'; ?>> alternative 2 </label> </div> </div> <div class="col-us-6 col-xs-3"> <div class="checkbox"> <label> <input type="checkbox" name="section[]" value="2319|2327|2335|2343|2351|2376|2401|2426"<?php if (@in_array(2319, $member_values['section'])) echo ' checked="checked"'; ?>> alternative 3 </label> </div> </div> <div class="col-us-6 col-xs-3"> <div class="checkbox"> <label> <input type="checkbox" name="section[]" value="2320|2328|2336|2344|2352|2377|2402|2427"<?php if (@in_array(2320, $member_values['section'])) echo ' checked="checked"'; ?>> alternative 4 </label> </div> </div> <div class="col-us-6 col-xs-3"> <div class="checkbox"> <label> <input type="checkbox" name="section[]" value="2321|2329|2337|2345|2353|2378|2403|2428"<?php if (@in_array(2321, $member_values['section'])) echo ' checked="checked"'; ?>> alternative 5 </label> </div> </div> <div class="col-us-6 col-xs-3"> <div class="checkbox"> <label> <input type="checkbox" name="section[]" value="2322|2330|2338|2346|2354|2379|2404|2429"<?php if (@in_array(2322, $member_values['section'])) echo ' checked="checked"'; ?>> alternative 6 </label> </div> </div> <div class="col-us-6 col-xs-3"> <div class="checkbox"> <label> <input type="checkbox" name="section[]" value="2323|2331|2339|2347|2355|2380|2405|2430"<?php if (@in_array(2323, $member_values['section'])) echo ' checked="checked"'; ?>> alternative 7 </label> </div> </div> <div class="col-us-6 col-xs-3"> <div class="checkbox"> <label> <input type="checkbox" name="section[]" value="2324|2332|2340|2348|2356|2381|2406|2431"<?php if (@in_array(2324, $member_values['section'])) echo ' checked="checked"'; ?>> alternative 8 </label> </div> </div> <!-- hidden setting --> <input type="checkbox" name="hiddensetting" value="1"<?php if (@$member_values['hiddensetting']) echo ' checked="checked"'; ?>>

html checkbox

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -