Hey peeps,

I have a form which has checkboxes and textboxes.

Im trying to make a for each to duplicate all the data appart from one cell and make a new insert for every checkbox that has been checked:

for each checkbox that has been checked insert into the database. so it'll look something like this

col1 col2 col3
1 2 3
1 2 5
1 2 9

Here how far its come:

PHP Code:

echo '<p> post places: ' $_POST['place'] . '</p>';
$places_array explode (',' $places);
'<p> places array: ' print_r($places_array) . '</p>';
$places_array as $place_entry){
$insert "INSERT INTO activities (`date`, `email`, `place`) VALUES ('".$daf."','".$email."','".$place_entry."','")";
$add_activity = mysql_query($insert);
$add_activity == false) {
$error = mysql_error();

This is what it prints out

post places: elm, fir

Array ( [0] => elm [1] => fir )
places array: 1

elm0 fir0

How would you make this work?