tengo una pagina de ventas con 5 campos
Código HTML:
<%@ Language=VBScript%> <% Dim oConn,strSQL, objRS Set oConn = Server.CreateObject("ADODB.Connection") oConn.Open("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("./Ventas.mdb")) 'strSQL = "SELECT * FROM Precios" 'Set objRS = oConn.Execute(strSQL) %> <html> <head> <link rel="STYLESHEET" type="text/css" href="css/letras.css"> <meta http-equiv="Content-Language" content="es"> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <meta name="GENERATOR" content="Microsoft FrontPage 4.0"> <meta name="ProgId" content="FrontPage.Editor.Document"> <title>Pagina nueva 1</title> </head> <body > <h1 align="center">Venta de productos</h1> <table border="1" width="100%" height="79"> <tr> <td width="25%" height="1" align="center"><b>PRODUCTOS</b></td><td width="13%" height="1" align="center"><b>CANTIDAD</b></td> <td width="12%" height="1" align="center"><b>COMPRAR</b></td><td width="25%" height="1" align="center"><b>PRECIO</b></td> <td width="25%" height="1" align="center"><b>SUBTOTAL</b></td> </tr> <tr> <td width="25%" height="1"> <form> <select name="polvo"> <option value="Fino">Polvo Fino</option> <option value="Grueso">Polvo Grueso</option> <option value="Lavado">Polvo Lavado</option> </select> </form> </td> <td width="13%" height="1"> <form method="POST" action="compras.asp" webbot-action="--WEBBOT-SELF--"> <p><input type="text" name="Cpolvo" size="20"></p> </form> </td> <td width="12%" height="1" align="center"><input type="checkbox" name="Copolvo" value="ON"></td> <td width="25%" height="1"> <% If From.polvo = Fino then strSQL = "SELECT precio FROM Precios where Producto="' request.form("polvo") & "'" response.write(strSQL) end if %> </td> <td width="25%" height="1"></td> </tr> </table> </body>