Buy.asp: Show goods and users shopping!
<!--#include file= "util.asp"-->
<%
DBPath = SERVER. MapPath ("Shopbag.mdb")
Set conn = Server.CreateObject ("ADODB. Connection ")
Conn.Open "Driver={microsoft Access driver (*.mdb)};d bq=" & DBPath
Categoryid=request ("CategoryID")
Description=request ("Description")
Head= City [& Description &] District
sql = "SELECT * FROM Products Where categoryid=" & CategoryID
sql = SQL & "ORDER by ProductID"
Set RS = conn. Execute (SQL)
%>
<HTML>
<HEAD><TITLE><%=Head%></TITLE></HEAD>
<body background= "B01.jpg" >
<font COLOR=BLUE><H2 align=center><%=head%><CENTER>
<form action=add.asp method=post>
<table border=1>
<tr bgcolor= #00FFFF >
<TD> selection </TD><TD> collers number </TD><TD> book name </TD><TD> price </TD><TD> books and periodicals introduction </TD></TR>
<%
While not Rs. Eof
Ischeck= ""
If InStr (Session ("ProductList"), RS ("ProductID")) > 0 Then
ischeck= "Checked"
End If
%>
<TR>
<TD align=center>
<input type=checkbox name= "ProductID value=" <%=rs ("ProductID")%> "<%=IsCheck%>>
</TD>
<td><%=rs ("ProductID")%></td>
<td><%=rs ("ProductName")%></td>
<TD align=right><%=rs ("Price")%></td>
<td><a href=<%=rs ("Link")%>><%=rs ("Description")%></a></td>
</TR>
<%
Rs. MoveNext
Wend
%>
</TABLE>
<input type=submit value= "Add shopping Bag" >
</Form>
<HR width=70%>
<a href=check.asp> View Shopping bags </A>
<a href=clear.asp> return all items </A><P>
<% Listcategory Conn%>
</CENTER>
</BODY>
</HTML>