Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

script to allow multiple questions insertion in one form to database

Status
Not open for further replies.

Candyb

Technical User
Oct 2, 2001
12
CA
I am creating a survey with 8 question with 3 to 8 different checkboxs for answers and i would like to know how to insert each question's answers into my database (each question into a new record) using a script. I think i have to maybe use for..in and perhaps look up an insert and insert my data?

for Request("MM_insert"){
MM_editQuery = "insert into " + MM_editTable + " (" + MM_tableValues + ") values (" + MM_dbValues + ")";
}
in Request.Form
but i don't know if this would work bc i don't know the correct coding. i would like to use this &quot;insert into&quot; for every &quot;mm_insert&quot; from <input type=&quot;hidden&quot; name=&quot;MM_insert&quot; value=&quot;true&quot;> to possibly insert the data.

This is confusing and i hope you understand what i am trying to say.

Thanks Candy
 
in VB there is this

for each Question in Request.form
conn.execute &quot;insert into Survey (surveyid, etc) & etc & etc.&quot;

I believe this takes a question on a survey and for each answer is put into the database as a separate record.

How do i transform this code into javascript?
I hope this clarifies.
Candy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top