This is modified from the article on this site "Storing checkbox data in a database". On the form page $skills is set up to create an array <input type="text" name="skills[] value="some_value">. $uid is another variable passed when the form was submitted.
//display all variable values passed to a page from a form //
while (list( , $skill) = each($skills))
{
$sql = "INSERT INTO lookup_skills (uid,skill_id) VALUES ('$uid','$skill')";
mysql_query($sql);
}