So I have a form that performs a query and populates the form with the results of that query in the form of file paths, when it was last updated etc.... It also displays 5 different audience checkboxes for each entry that is populated, and these checkboxes are checked if they have values in the database (there are 5 possible audience values - hence 5 checkboxes - and one entry can have multiple audience values so multiple checkboxes can be checked in one entry). So far I have all of that working, the page displays all the correct entries and their audience checkboxes from my mysql database. Now what I need to do is find a way to detect if there is a change in those checkboxes from what was originally retrieved from the database, and if there is a change then the values are inserted into the database. How do I go about doing this? Javascript? Compare arrays in PHP? Here is part of my while loop that populates the form with check boxes:
printf("\t<tr class='recordrow'>
\n\t\t<td><a class='page_modal' href='#mWindow%s' target='_blank'>%s</a></td>
\n\t\t<td class='ppath'>%s</a></td>
\n\t\t<td>%s</td>
\n\t\t<td><input type='checkbox' name='audience[]' $currentcheckbox/><div class='page_dialog' id='mWindow%s'><img src='exit.png' class='close' alt='close'/><img src='newwin.jpg' alt='new window'/><div id='content_section'>%s</div></div> </td>
\n\t\t<td><input type='checkbox' name='audience[]' $prospectivecheckbox/></td>
\n\t\t<td><input type='checkbox' name='audience[]' $facultycheckbox/></td>
\n\t\t<td><input type='checkbox' name='audience[]' $staffcheckbox/></td>
\n\t\t<td><input type='checkbox' name='audience[]' $externalcheckbox/></td>
\t</tr>",$folder_content["cms_id"],$folder_content["display_name"],$page_path,$update,$folder_content["cms_id"],$folder_content["path"],$folder_content["cms_id"],$folder_content["content"]);