I have a form like below :
<form action="" method="post">
<input type="checkbox" id="status_1" name="status_1" value="1" />
<input type="checkbox" id="status_2" name="status_2" value="1" />
<input type="checkbox" id="status_3" name="status_3" value="1" />
</form>
When i check all checkbox and post the form, the result is like this:
Array ([status_3] => 1 [status_2] => 1 [status_1] => 1 )
Then i uncheck second checkbox and post the form, the result is like this:
Array ( [status_3] => 1 [status_1] => 1 )
Is it possible to make result like this below when i uncheck second checkbox :
Array ( [status_3] => 1 [status_2] => 0 [status_1] => 1 )
There are ideas to do it?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…