<% Call SetConn () id=request("id") sql="select * from Tproduct where mdel=0 and id="&id set rs=conn.execute (sql) if (rs.eof and rs.bof) then response.write "" response.End end if Sub PutToShopBag( add, ProductList ) If Len(ProductList) = 0 Then ProductList = add 'ProductList = "'" & add & "'" ElseIf InStr( ProductList, add ) <= 0 Then ProductList = ProductList & "," & add End If End Sub ProductList = Session("ProductList") Products = Split(id,",") For I=0 To UBound(Products) PutToShopBag Products(I), ProductList Next Session("ProductList") = ProductList 'response.write Session("ProductList") response.redirect "buy.asp?id="& id&"" %>