php - only submit is check box is checked -


<div id="checkbox">     <input type="checkbox" id="1" name="1"/><br/> <input type="checkbox" id="2" name="2"/><br/> <input type="checkbox" id="3" name="3"/><br/> <input type="submit" value="create"/> </div> 

i have above code , need sort of check form submits if @ least 1 box checked wont submit if 2 boxes checked, checks make sure 1 checked.

many thanks

i suggest use radio buttons group. may follow reference

with radio button, don't need use javascript. if insist use checkbox, using javascript 1 of solution.


Comments

Popular posts from this blog

c# - Operator '==' incompatible with operand types 'Guid' and 'Guid' using DynamicExpression.ParseLambda<T, bool> -