Answered
List Multiple Selection to MySQL
How do I take multiple selections from the List box in a form
in Dreamweaver 8 and post to MySQL?
I tried using implode as recommended here: http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=12&catid=263&threadid=1112556&highlight_key=y&keyword1=multiple
This worked unless the user did not select any items in the list. Then I received a bad arguement error message.
I then tried just using POST without the implode and [] on the end of the select name, but this put the word "Array" in the column/row in the database instead of the data.
I then tried the POST with the [] on the select name and [] in the SQL statement: GetSQLValueString($_POST['appliances[]'], "text"), Dreamweaver would not let me associate this under Insert Record in the Server Behaviors section - so Null is put in the database.
I need to be able to post multiple items selected from a list box to MySQL, but allow the user not to select anything from the list box without receiving an error.
I tried using implode as recommended here: http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=12&catid=263&threadid=1112556&highlight_key=y&keyword1=multiple
This worked unless the user did not select any items in the list. Then I received a bad arguement error message.
I then tried just using POST without the implode and [] on the end of the select name, but this put the word "Array" in the column/row in the database instead of the data.
I then tried the POST with the [] on the select name and [] in the SQL statement: GetSQLValueString($_POST['appliances[]'], "text"), Dreamweaver would not let me associate this under Insert Record in the Server Behaviors section - so Null is put in the database.
I need to be able to post multiple items selected from a list box to MySQL, but allow the user not to select anything from the list box without receiving an error.
