CMPPRICE.ASP
<html> 
<head><title>Chet's Damage Assessment</title><head> 
<body background="Cldshalf.jpg" BGCOLOR=ffffcc TEXT="#000000"> 
 
 
<h1>Chet's Damage Assessment</h1> 
 
<h3>System Configuration</h3> 
<% 
' Print system configuration 
vSelections = Array("CPUs", "Memory", "HardDrives", "Monitors", "VideoBoards", "CDROMs", "SoundCards", "Printers", "Modems") 
for i = 0 to ubound(vSelections) 
response.write(request.form(vSelections(i))) 
response.write("<br>") 
next 
%> 
 
<% 
' Figure out the cost 
pricesql = "select sum(unitprice) from products where " 
pricesql = pricesql & "productname = '" & request.form(vSelections(0)) & "'" 
for i = 1 to ubound(vSelections) 
pricesql = pricesql & " or productname = '" & request.form(vSelections(i)) & "'" 
next 
 
set price = server.createobject("adodb.recordset") 
price.open pricesql, "dsn=compsales;uid=admin;pwd=;", 1 
%> 
 
<h3>Damage : <%=price(0)%>$ </h3> 
 
<hr size=4> 
<font face="MS SANS SERIF" size=1> 
The data mentioned herein is totally fictitious and is in no way intended to represent any  
real data, unless otherwise noted. 
<p> 
<img src="ie_anim.gif" width="88" height="31" align=right alt="ie"> 
</font> 
 
</body> 
</html>