I have a form who asks for a series of check boxes... 

```
<? while( $tag2 = mysql_fetch_array($tag))
{ ?>
 <td><? echo $tag2['tag'];?><input type="checkbox" name="check[]" value="<? echo $tag2['tag_id'];?>"></td>
    <? } ?>

```

how do I treat the sql to insert in DB with the check box array. So far, I have this, but can't figure out how to account for the different checkboxes:

```
if(isset($_POST['submit']))
{
   if(!empty($_POST['check']))
 {
     foreach($_POST['check'] as $check)

     {
            // DONT KNOW WHAT TO DO HERE
     }
}

 $sql = mysql_query("insert into ..... ");

```