Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Multiple insert record according to checkboxes?

Author  Topic 

monaya
Yak Posting Veteran

58 Posts

Posted - 2009-02-05 : 13:31:49
I have 2 html inputs in a form. One field is a textfield. The other field is repeated checkboxes whose names & values come from a query. I want to insert field one multiple times according to how many checkboxes are selected. I also need to insert the checkbox value as a column along with each record.

The result of the form is one textfield that needs to be inserted into a table as many times as there are checkboxes selected along with the value of the checkbox that needs to be submitted with as a column value.


This may require info on both SQL and the web programming language?

revdnrdy
Posting Yak Master

220 Posts

Posted - 2009-02-05 : 13:53:56
Yes.. Its called a 3 tier model.

Or to say it more simply

WebPage =(Presentation) Tier1
Scripting Language = (Logic) Tier2
Database = (storage) Tier3

Your user fills out data on the webpage (Tier1).
Your user clicks a submit button and the data is handled by a scripting language with embedded SQL syntax (Tier2). This is called a form submission. Each checkbox is an element of the form and this data can be retrieved by the scripting language.
The database will hold (store) the inserted data (Tier 3).

You can implement this in several ways. There are tons of webpages with examples on how to store & retrieve data from a database via a form submission.

r&r








Go to Top of Page
   

- Advertisement -