I am very very new on asp,
I am working on this page:
http://www.chloecloset.com/products_new.asp
These products have a category in the database. My question is, how do I tell the webpage to retrieve only the products from the category that I want. How can I pass that information from a previous page so the products_new.asp page knows which products to put in the dynamic table?
In the old products.asp page this worked with this string in the url box:
http://www.chloecloset.com/products.asp?cat=98
the fields that my recordset have are:
pDescription, pID, pImage, pSection
I think pSection is equal to cat number
Please advice, I am attaching my code
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%
Dim rsProducts
Dim rsProducts_numRows
Set rsProducts = Server.CreateObject("ADODB.Recordset")
rsProducts.ActiveConnection = MM_chicvintage_STRING
rsProducts.Source = "SELECT pDescription, pID, pImage, pSection FROM products ORDER BY pSection ASC"
rsProducts.CursorType = 0
rsProducts.CursorLocation = 2
rsProducts.LockType = 1
rsProducts.Open()
rsProducts_numRows = 0
%>
<%
Dim Repeat1__numRows
Dim Repeat1__index
Repeat1__numRows = 10
Repeat1__index = 0
rsProducts_numRows = rsProducts_numRows + Repeat1__numRows
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; ">
<title>products new</title>
</head>
<body>
<table border="1">
<tr>
<%
'***************************
'
http://www.DwZone.it
' DwZone Horizontal Looper
' Version 1.1.2
' Before Selection Code
'***************************
dwzLooperCol = 5
dwzLooperRow = 2
dwzCol = 0
dwzRow = 0
do while not rsProducts.eof
dwzCol = dwzCol + 1
%><td><table width="250" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><a href="http://www.chloecloset.com/proddetail.asp?prod=<%=(rsProducts.Fields.Item("pI D").Value)%>"><img src="<%=(rsProducts.Fields.Item("pImage").Value)%> " border="0"></a><br>
<%=(rsProducts.Fields.Item("pDescription").Value)% ></td>
</tr>
</table></td><%
'***************************
'
http://www.DwZone.it
' DwZone Horizontal Looper
' Version 1.1.2
' After Selection Code
'***************************
if dwzCol = dwzLooperCol then
response.write("</t" & " r>" & vbcrlf & "<t" & "r>")
dwzCol = 0
dwzRow = dwzRow + 1
end if
if dwzRow >= dwzLooperRow and dwzLooperRow <> -1 then
exit do
end if
rsProducts.MoveNext
loop
for dwz_i = (dwzCol+1) to dwzLooperCol
response.write("<t" & "d> </t" & "d>")
next
%>
</tr>
</table>
<p> </p>
</body>
</html>
<%
rsProducts.Close()
Set rsProducts = Nothing
%>
<a href="http://www.ildw.com">Houston Web Design</a>