<!--#include file=CONN.ASP-->
<!--#include file=usercookies.asp-->
<%
dim rs,sql,id,i,str2,username
username=request.cookies("fox")("username")
id=trim(request("id"))
if trim(id)="" then
response.write "<script language=JavaScript>" & chr(13) & "alert('没有选择商品记录！');" & "history.back()" & "</script>"
response.end
end if
str2=split(id,",")
set rs=server.createobject("adodb.recordset")
for i=0 to ubound(str2)
sql="delete from [FOX_basket] where username='"&username&"' and id="&cstr(str2(i))
rs.open sql,conn,1,3
next
response.write "<script language=JavaScript>" & chr(13) & "alert('删除商品成功！');" & "window.location='basket.asp?id="&id&"'" & "</script>"
response.end
rs.close
set rs=nothing
closedb
%></body></html>