Sorry, somehow managed to screwup the above post. Meant to write:
This should do the job:
$dbc = mysql_connect('localhost', 'root', 'root')
or die ('Cannot connect');
mysql_select_db("video", $dbc);
if (isset($_POST['Submit'])) {
foreach ($_POST['genre'] as $genre_insert) {
if (strlen($genre_insert)!=0){
$query = "INSERT INTO genre(Genre) VALUES('$genre_insert')";
$result = mysql_query($query, $dbc);
}
}
}
mysql_close($dbc);