Possible Duplicate:
checkbox check all option
<form action='ppc_logistic-control_number.php' target='_blank' method='post'>
<b>Sample Program</b><br>
<input type='checkbox'>
<?php
for($i=0;$i<5;$i++)
{
print"<input name='checkbox[]' type='checkbox' id='checkbox[]' value='$i->logi_id' value='$i->ppc_id' style='margin-left:-5px'><br>";
}
?>
<input type="submit" value="submit" name="gen"/>
what jquery or javascript code i need to place here in order: when i check the checkbox in top of 5 checkbox, all the checkbox will have a check, and when I remove the checkbox that ive previously check also the 5 checkbox will remove thier check.
sample:
sample demo thank you so much.