<html>
<script language=VBScript runat=Server>
response.write "<html>"
response.write "<body>"
response.write "<FONT face=arial>"
response.write "<H2>Thanks for your request Ben.</h2>"
response.write "
Here is the cost for your chosen computer:-"
response.write "
</br>"
set adocn=server.createobject("ADODB.Connection")
adocn.provider="Microsoft.Jet.Oledb.4.0"
adocn.connectionstring=server.mappath("prices.mdb")
adocn.open
memID=request.querystring("memory")
CPUID=request.querystring("CPU")
monitorID=request.querystring("monitor")
set adors=server.createobject("ADODB.Recordset")
adors.open "SELECT Cost FROM tblMemory WHERE MemID=" & memID,adocn,0,1
response.write "Memory Cost = " & adors.fields(0).value
x=adors.fields(0).value
adors.close
set adors=server.createobject("ADODB.Recordset")
adors.open "SELECT Cost FROM tblCPU WHERE CPUID=" & CPUID,adocn,0,1
response.write "
CPU Cost = " & adors.fields(0).value
y=adors.fields(0).value
adors.close
set adors=server.createobject("ADODB.Recordset")
adors.open "SELECT Cost FROM tblMonitor WHERE MonitorID=" & monitorID,adocn,0,1
z=adors.fields(0).value
response.write "
Monitor Cost = " & adors.fields(0).value
response.write "
TOTAL COST = " & x+y+z & ""
adors.close
adocn.execute "insert into tblMemory (Description) VALUES ('Test')"
adocn.close
</script>
<font face="Arial">Click here to get another price</font></p>
</html>