帮我解释一下asp购物车代码,谢谢拉!!!
<%strCpbm=Request("cpbm")if((len(trim(strCpbm))=0)or(strCpbm="undefined"))thenstrChec...
<%
strCpbm = Request("cpbm")
if ((len(trim(strCpbm)) = 0) or (strCpbm = "undefined")) then
strCheck = "no"
end if
ProductList = Session("ProductList")
Products = Split(Request("cpbm"), ", ")
For I=0 To UBound(Products)
PutToShopBag Products(I), ProductList
Next
Session("ProductList") = ProductList
Head="以下是您所选购的物品清单"
ProductList = Session("ProductList")
If Len(ProductList) =0 Then
Response.Redirect "nothing.asp"
response.end
end if
If Request("MySelf") = "Yes" Then
ProductList = ""
Products = Split(Request("cpbm"), ", ")
For I=0 To UBound(Products)
PutToShopBag Products(I), ProductList
Next
Session("ProductList") = ProductList
End If
If Len(ProductList) = 0 Then
Response.Redirect "nothing.asp"
response.end
end if
set rs=server.createobject("adodb.recordset")
sql = "Select * From Product"
sql = sql & " Where Product_Id In (" & ProductList & ")"
rs.open sql,conn,3,3
%> 展开
strCpbm = Request("cpbm")
if ((len(trim(strCpbm)) = 0) or (strCpbm = "undefined")) then
strCheck = "no"
end if
ProductList = Session("ProductList")
Products = Split(Request("cpbm"), ", ")
For I=0 To UBound(Products)
PutToShopBag Products(I), ProductList
Next
Session("ProductList") = ProductList
Head="以下是您所选购的物品清单"
ProductList = Session("ProductList")
If Len(ProductList) =0 Then
Response.Redirect "nothing.asp"
response.end
end if
If Request("MySelf") = "Yes" Then
ProductList = ""
Products = Split(Request("cpbm"), ", ")
For I=0 To UBound(Products)
PutToShopBag Products(I), ProductList
Next
Session("ProductList") = ProductList
End If
If Len(ProductList) = 0 Then
Response.Redirect "nothing.asp"
response.end
end if
set rs=server.createobject("adodb.recordset")
sql = "Select * From Product"
sql = sql & " Where Product_Id In (" & ProductList & ")"
rs.open sql,conn,3,3
%> 展开
1个回答
展开全部
if ((len(trim(strCpbm)) = 0) or (strCpbm = "undefined")) then
strCheck = "no"
end if
判断一下获得的值是不是为空
Products = Split(Request("cpbm"), ", ")
For I=0 To UBound(Products)
得到用户订的产品放在数组里面
然后把这个数组放在Session(Productlist)
中
在下面判断是不是为空
如要为空就跳到 nothing.asp
这是我的理解 不是很全只能说到这了
strCheck = "no"
end if
判断一下获得的值是不是为空
Products = Split(Request("cpbm"), ", ")
For I=0 To UBound(Products)
得到用户订的产品放在数组里面
然后把这个数组放在Session(Productlist)
中
在下面判断是不是为空
如要为空就跳到 nothing.asp
这是我的理解 不是很全只能说到这了
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询