944,026 Members | Top Members by Rank

Ad:
  • ASP Discussion Thread
  • Unsolved
  • Views: 7468
  • ASP RSS
Mar 16th, 2005
0

check box

Expand Post »
hello every body

i have a form that will have multiple check boxes on it . and i have 20 machinery for sale. thereform i have 20 checkboxes in my form.
all the checkboxes have different value but checkboxes name will be same.
my requirement is that when a customer want to purchase 1 or 2 or 3 or 4
machinery from out of 20 machinery.now custmer click on checkboxes if a custmer click 10 checkbox or want to purchase 10 machinery then all 10 machinery submit in database.i think for this purpose i need loop. may be for loop, while loop.

how i can do this (code in item.asp)

<TR>
<TD>Product Name</TD>
<TD>
<input type="checkbox" name="givenname" value="vacuum">
</TD>
</TR>
<TR>
<TD>Product Name</TD>
<TD>
<input type="checkbox" name="givenname" value="sandbox">
</TD>
</TR>


(code in additem.asp)

rsUsers("givenname") = Request.Form("givenname")
Similar Threads
Reputation Points: 10
Solved Threads: 0
Light Poster
faisyshah is offline Offline
27 posts
since Dec 2004
Mar 18th, 2005
0

Re: check box

you are in luck i had the same problem, until yesterday. I found this article and modified the code to, instead of deleteing the records it shows them (http://www.webthang.co.uk/tuts/tuts_dmx/rob3/rob3.asp).

insted of
cDelete.CommandText = "DELETE FROM tblTemp WHERE tblTemp.RecordID IN (" & sDelete & ")"

change to
cDelete.CommandText = "Select * FROM tblTemp WHERE tblTemp.RecordID IN (" & sDelete & ")"

remove
Response.Redirect("delete.asp")

and loop like any other recordset

hope it helps!
Reputation Points: 10
Solved Threads: 2
Junior Poster
william_stam is offline Offline
131 posts
since Mar 2005
Mar 19th, 2005
0

Re: check box

sir first i want to submit data in my order table.
for example i have three tables in my database
customer table
item table
order table
when customer want to purchase some machinery first he enter information about himself. customer information will submit in customer table.
then he want to purchase some machinery
the order table consist of (for example)
order id(primery key)(auto generate)
customer id (foreign key)
product name

i mean three columns in order table

for that purpose iam using a form which consist of 20 checkboxes
the name of all check boxes will be same but values will be different
for example
one checkbox name is product but value will be sandbox (sandbox is the name of machinery)
other check box name is product but value will be different(vacuum tube is the name of machinery)
similarly 20 chekboxes in my form
machinery name and checkbox value will be same
now when customer want to purchahe one or more machinery then customer click on check box now checkboxes values will be submit in database.
(note) customer can give order for 10 or more machinery the please please pleae tell me how order will be submit in order table from checkbox to order table.
please describe me in detail
can u describe complete code
Reputation Points: 10
Solved Threads: 0
Light Poster
faisyshah is offline Offline
27 posts
since Dec 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ASP Forum Timeline: Not bale to view my ASP page
Next Thread in ASP Forum Timeline: recordset from multiple checkbox values





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC