Hi,
I have this code to lista check box for all my columns in a database
$result = mysql_query("SHOW COLUMNS FROM news_sections");
$cbo_field_names = "";
while (list($field_name) = mysql_fetch_row($result))
{
?>
<input type="checkbox" name="<?php echo $field_name; ?>" value="<?php echo $id; ?>"> - <?php echo $field_name; ?> <br>
<?php
}
?>
Now I want to run a code which will insert a new row with the id in each column which is ticked. But I want this code set so if i add a new column then I don't have to edit and code.
Can this be done?
If so any ideas how?