I make a php page i want to attach check box with list box option value how i attached checkbox,here is my code:
<select name="recepients[]" multiple size="10" multiple="multiple" >
<?
//echo $eventid=$_POST['events'];
$count=count($_POST['events']);
for($i=0; $i<$count; $i++){
$select="select b.first_name,b.last_name from buyers b,registrations r where b.buyer_id=r.buyer_id and r.event_id='".$_POST['events'][$i]."' group by r.buyer_id";
$res = $GLOBALS ['mysqli']->query ($select) or die ($GLOBALS ['mysqli']->error . __LINE__);
if ($res->num_rows > 0)
{
while($row = $res->fetch_assoc ())
{
?>
<input type="checkbox" name="receptionts[]" checked="checked"/>
<option value="<?=$row['first_name']?>"><?=$row['last_name']?></option>
<?
}
}
}
?>
</select>