I wouldn't store the selected search engines in a separate table, I would store the as a comma separated list in a column of the main table.
to do this, name the checkboxes the same with a "[]} at the end to create an array of the selections, for example:
<label>
<input type="checkbox" name="searchEngines[]" value="Google" id="searchEngines_0" />
Google</label>
<br />
<label>
<input type="checkbox" name="searchEngines[]" value="Bing" id="searchEngines_1" />
Bing</label>
<br />
<label>
<input type="checkbox" name="searchEngines[]" value="Yahoo" id="searchEngines_2" />
Yahoo</label>
<br />
in the insert record, when you bind the searchengine column to the search engine checkbox group, the code will look like this:
<?php echo((isset($_POST["searchEngines[]"]))?$_POST["searchEngines[]"]:"") ?>
you will need to remove the "[]" from the end of the name:
<?php echo((isset($_POST["searchEngines"]))?$_POST["searchEngines"]:"") ?>
the add this code to convert the array to a string at line :
<?php
if($_SERVER["REQUEST_METHOD"] == "POST") {
foreach($_POST as $key => $val) {
if(is_array($_POST[$key])) $_POST[$key] = implode(", ", $_POST[$key]);
}
}
?>