home *** CD-ROM | disk | FTP | other *** search
/ Practical Internet Web Designer 89 / PIWD89.iso / pc / CONTENTS / DEVELOPER / TUTORIAL_FILES / Pages92-93 / viewimage.asp < prev   
Encoding:
Text File  |  2003-11-23  |  1013 b   |  35 lines

  1. <%@LANGUAGE = "VBSCRIPT"%>
  2. <%Option Explicit%>
  3. <%
  4. Dim conn, rs, strSQL
  5. Set conn = Server.CreateObject("ADODB.Connection")
  6. conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
  7.            "Data Source=F:\Databases\photoalbum.mdb;"  & _
  8.            "Jet OLEDB:Database"
  9. Set rs = Server.CreateObject("ADODB.RecordSet")
  10. strSQL = "SELECT imageTitle, imageDesc, imageFilename FROM tblImages WHERE imageID=" & Request.QueryString("id")
  11. rs.open strSQL, conn
  12. %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  13.     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  14.  
  15. <html>
  16. <head>
  17. <title>Photo Album</title>
  18. <link rel="stylesheet" type="text/css" href="global.css" />
  19. </head>
  20.  
  21. <body>
  22. <div id="content">
  23. <h1><%=rs("imageTitle")%></h1>
  24. <p><%=rs("imageDesc")%></p>
  25. <p><img src="/uploads/<%=rs("imageFilename")%>" alt="<%=rs("imageTitle")%>" /></p>
  26. <p><a href="viewalbum.asp"><< Back to album</a></p>
  27. </div>
  28. <%rs.close
  29. set rs = nothing
  30. conn.close
  31. set conn = nothing%>
  32. </body>
  33. </html>
  34.  
  35.