An example of a simple online bookstore (iii)!

Source: Internet
Author: User
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&GT;&LT;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>
&LT;TD align=center>
<input type=checkbox name= "ProductID value=" <%=rs ("ProductID")%> "<%=IsCheck%>>
</TD>

<td><%=rs ("ProductID")%></td>
<td><%=rs ("ProductName")%></td>
&LT;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>
&LT;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>



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.