Using a form I am inserting the information from 3 text fields and 2 checkboxes into a MySQL database.
The database consists of 2 tables with the following rows:
id - articletitle - articleorganization - articledate - articleurl
id - article_tags - articlid - tagid
The checkboxes use an array and are coded thus:
<input type="checkbox" name="articletags[]" value="geology" id="articletags_0" />
<input type="checkbox" name="articletags[]" value="astronomy" id="articletags_1" />
And the MySQL statement looks like this:
mysql_query("INSERT INTO articles SET articletitle='$articletitle',
articleorganization='$articleorganization',
articledate='$articledate',
articleurl='$articleurl' ")
mysql_query2("INSERT INTO articles_tags SET articletags='$articletags' ")
However, when I visit the page in a web browser it shows a blank page.
In case anyone is wondering, the reason I'm using checkboxes is because the articles will need to be tagged with a combination of tags, and this will ensure that consistency is used in the tagging. Also, I have a form used to edit the articles, and the database structure could, I believe, be used to make the checkboxes "checked" on the edit page.
Any advice is greatly appreciated.