G
greg
HI,
I have an asp page that loops through the forms collection gathering data
from input controls that web surfers have entered in. The problem I have is
when I get to the submit button, I get the follow error "Type mismatch:
'[string: "Send Me the Brochure"]' " "send me the brochure" is the text on
the submit button. I don't know how to have the loop skip the submit
button. Any help would be appreciated.
here is the code:
dim x
For x = 1 to Request.Form.Count
'brochure names are prefixed with a b to identify them from the forms
collection
if left(Request.Form.Key(x),1)= "b" then
'check if order count is > 0, if so add it to the orderdetail table
if Request.Form.Item(x) > 0 then
mysql = "INSERT INTO tblOrderDetail (OrderID, BrochureID,
Quanity) VALUES ('" & intOrderID & "','" & right(Request.Form.Key
(x), len(Request.Form.Key(x))-1) & "','" & Request.Form.Item(x) & "')"
'Response.Write(mysql & "<br>")
ConnOrders.Execute mysql
end if
End if
'Response.Write Request.Form.Key(x) & " = "
'Response.Write Request.Form.Item(x) & "<br>"
Next
Greg
I have an asp page that loops through the forms collection gathering data
from input controls that web surfers have entered in. The problem I have is
when I get to the submit button, I get the follow error "Type mismatch:
'[string: "Send Me the Brochure"]' " "send me the brochure" is the text on
the submit button. I don't know how to have the loop skip the submit
button. Any help would be appreciated.
here is the code:
dim x
For x = 1 to Request.Form.Count
'brochure names are prefixed with a b to identify them from the forms
collection
if left(Request.Form.Key(x),1)= "b" then
'check if order count is > 0, if so add it to the orderdetail table
if Request.Form.Item(x) > 0 then
mysql = "INSERT INTO tblOrderDetail (OrderID, BrochureID,
Quanity) VALUES ('" & intOrderID & "','" & right(Request.Form.Key
(x), len(Request.Form.Key(x))-1) & "','" & Request.Form.Item(x) & "')"
'Response.Write(mysql & "<br>")
ConnOrders.Execute mysql
end if
End if
'Response.Write Request.Form.Key(x) & " = "
'Response.Write Request.Form.Item(x) & "<br>"
Next
Greg