|
-
Mulitple Insert
Hello,
I have a mulitple select form:
<select name="insert_value" size="4" multiple>
<option value="value1">Option1</option>
<option value="value2">Option2</option>
<option value="value3">Option3</option>
<option value="value4">Option4</option>
</select>
And an SQL INSERT statement:
$query = "INSERT INTO table1 (field1) VALUES ('$insert_value')";
mysql_query($query);
How can I insert mulitple values from the select form into field1 in my database?
---  ---
-
it looks like you're using php
the select name should be named like an array, IE insert_value[]. Then you can loop through the values one item at a time to build the insert.
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|
Bookmarks