I would like to put a picture on may page and I would like to use this picture as a button to execute an sql query, so when you clik on the picture you will hace displayed in the next page the product in the data base and other info like price for example.
I have this code to access the data base but I do not know how to use a picture s a buton to use it.
Can any one help please.
Maya
<%
Dim mySQL, myRS, CategoryID
CategoryID = CInt(Request.QueryString("CategoryID"))
mySQL = "SELECT ProductID, image, title, Category " &_
"FROM Categories INNER JOIN Products " &_
"ON Categories.CategoryID = Products.CategoryID " &_
"WHERE Products.CategoryID = " & CategoryID & " " &_
"ORDER BY Title"
Set myRS = Server.CreateObject("ADODB.Recordset")
myRS.Open mySQL, myConn
Response.Write "<p>The products in the category of <b>" & myRS("image") & "</b> are shown below:"
While Not myRS.EOF
Response.Write "<p><b><a href='products2.asp?ProductID=" &_
myRS("ProductID") & "'>"& myRS("image") & "</a></b><br>"
Response.Write "<img align='centre' hspace='5' vspace='5' src='graphics/" & myRS("Image") & "'>"
myRS.MoveNext
Wend
%>
PS: THIS

MY EXAMPLE:
http://www.tigerdirect.com/applicat...lc.asp?CatId=12
MANY MANY THANKS