Thanks in advance for any help...
I have a piece of code - viewbasket.asp where variable
strProdCode and intQuant are pulled from itemsOrdered table on a
Loop from the DB (SQL Server) after they have been added, which
it does correctly...
<form action="checkout.asp" method="post" id="form1"
name="form1">
<input name="quant<%= strProdCode %>" value="<%=intQuant%>"
maxlength="2">
<input type="submit">
If you change the quantity and update - it goes to Checkout.asp
where again it loops thru and creates a variable
'quantProductCode' to see if there is a match with Request.Form
("element") and if so change it....
set rsProd = server.createobject("ADODB.Recordset")
strSQL = "select * from itemsOrdered where itemsOrdered.orderID
= " & cstr(Session("orderID"))
set rsProd = Conn.Execute(strSQL)
if rsProd.EOF and rsProd.BOF then
Session("orderID") = ""
Response.redirect "checkout.asp"
End if
rsProd.movefirst
while not rsProd.EOF
element = "quant" & rsProd("productCode")
intQuant = Request.Form("element")
response.write element & " - " & Request.Form("element")
& " - " & intQuant
if intQuant <> "" and isNumeric(intQuant) then
if intQuant = 0 then
rsProd.Delete
Session("morethangiftcert") = ""
else
rsProd("quantity") = intQuant
End if
End if
rsProd.Update
rsProd.MoveNext
The problem - this was originally set to be:
intProdID on viewbasket.asp and rsProd("productID") on
checkout.asp - integers which worked and did the change...
the new ProductCode variable is nvarchar... and does not work
if i do a response.write on both pages i can see that the
quantProductCode in both cases match - but checkout.asp doesn't
see the value quantity being passed in the form...
Any ideas of how to fix this? i'd stick to productID but i have
products in more that one table, which is necessary for what im
doing - your help is appreciated.
----------------------------------------------
Posted with NewsLeecher v2.0 Beta 5
* Binary Usenet Leeching Made Easy
* http://www.newsleecher.com/?usenet
----------------------------------------------