Example 3 of a simple online bookstore )!

Source: Internet
Author: User
Buy. asp: displays items and users' purchases!
<! -- # Include file = "Util. asp" -->
<%
DbPath = SERVER. MapPath ("ShopBag. mdb ")
Set conn = Server. CreateObject ("ADODB. Connection ")
Conn. open "driver = {Microsoft Access Driver (*. mdb)}; dbq =" & DbPath
CategoryID = Request ("CategoryID ")
Description = Request ("Description ")
Head = "Huiwen bookstore [" & Description"
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 %> </H2> </font>
<CENTER>
<Form Action = Add. asp Method = POST>
<TABLE Border = 1>
<Tr bgcolor = #00 FFFF>
<TD> select </TD> <TD> Book No. </TD> <TD> book name </TD> <TD> Price </TD> <TD> book 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>
Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

11.11 Big Sale for Cloud

Get Unbeatable Offers with up to 90% Off,Oct.24-Nov.13 (UTC+8)

Get It Now >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

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.