home *** CD-ROM | disk | FTP | other *** search
/ Practical Internet Web Designer 90 / PIWD90.iso / mac / contents / developer / tutorial_files / Pages90-91 / postcards / select.asp < prev   
Text File  |  2003-12-16  |  1KB  |  45 lines

  1. <%@LANGUAGE = "VBSCRIPT"%>
  2. <%Option Explicit%>
  3. <!--#include file="conn.asp"-->
  4. <%Dim rsCards, strSQL
  5. %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  6.     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  7.  
  8. <html>
  9. <head>
  10. <title>Select your Postcard</title>
  11. <link href="postcards.css" rel="stylesheet" type="text/css" />
  12. </head>
  13.  
  14. <body>
  15. <div id="content">
  16. <h1>Select a postcard</h1>
  17. <p>Choose one of the postcards below then click the 'select card' button to add your message.</p>
  18. <%Set rsCards = Server.CreateObject("ADODB.Recordset")
  19. strSQL = "SELECT * FROM tblPostcards"
  20. rsCards.open strSQL, conn
  21. if Not rsCards.eof Then%>
  22. <form method="post" action="">
  23. <ul id="cardlist">
  24. <%Do While Not rsCards.eof%>
  25. <li><img src="postcards/<%=rsCards("postcardLocation")%>" alt="<%=rsCards("postcardTitle")%>" />
  26. <br /><input type="radio" name="postcardID" value="<%=rsCards("postcardID")%>" /> Select this card</li>
  27. <%rsCards.MoveNext
  28. loop
  29. %>
  30. </ul>
  31. <p class="clear"><input type="submit" value="Select Card" /></p>
  32. </form>
  33. <%else%>
  34. <p>There are currently no cards available for selection.</p>
  35.  
  36. <%end if
  37. rsCards.close
  38. Set rsCards = Nothing
  39. conn.close
  40. Set conn = Nothing%>
  41. </div>
  42. </body>
  43. </html>
  44.  
  45.