<!--#include file="webconn.asp"-->
<!--#include file="check.asp"-->
<%
id=server.HTMLEncode(trim(request.QueryString("id")))
if id="" then 
response.write "<script>alert('请填写相关信息!');history.go(-1);</Script>"
else
set rs=server.CreateObject("adodb.recordset")
sql="select * from cart"
rs.open sql,conn,1,3
rs.addnew
rs("c_name")=id
rs("c_time")=now()
rs("c_user")=session("user")
rs.update
rs.close
set rs=nothing
response.write "<script>alert('购买成功!');location='center.asp?id=购买记录';</Script>"
end if
%>