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
Wrap
Text File
|
2003-12-16
|
1KB
|
45 lines
<%@LANGUAGE = "VBSCRIPT"%>
<%Option Explicit%>
<!--#include file="conn.asp"-->
<%Dim rsCards, strSQL
%><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>Select your Postcard</title>
<link href="postcards.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="content">
<h1>Select a postcard</h1>
<p>Choose one of the postcards below then click the 'select card' button to add your message.</p>
<%Set rsCards = Server.CreateObject("ADODB.Recordset")
strSQL = "SELECT * FROM tblPostcards"
rsCards.open strSQL, conn
if Not rsCards.eof Then%>
<form method="post" action="">
<ul id="cardlist">
<%Do While Not rsCards.eof%>
<li><img src="postcards/<%=rsCards("postcardLocation")%>" alt="<%=rsCards("postcardTitle")%>" />
<br /><input type="radio" name="postcardID" value="<%=rsCards("postcardID")%>" /> Select this card</li>
<%rsCards.MoveNext
loop
%>
</ul>
<p class="clear"><input type="submit" value="Select Card" /></p>
</form>
<%else%>
<p>There are currently no cards available for selection.</p>
<%end if
rsCards.close
Set rsCards = Nothing
conn.close
Set conn = Nothing%>
</div>
</body>
</html>