
22/11/2004, 22:09
|
| | Fecha de Ingreso: noviembre-2004
Mensajes: 2
Antigüedad: 20 años, 5 meses Puntos: 0 | |
La verdad es que soy novato en el tema y lo hago todo con dremweaver y lo que me has explicado no se como llevarlo a la práctica. Te copio el código de las dos páginas a ver si me puedes ayudar, de todas formas gracias.
-Página busqueda:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<html>
<head>
<title>Documento sin título</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<form name="form1" method="get" action="/detalle.asp">
<select name="buscar" id="buscar">
<option>daniel</option>
<option>sergio</option>
<option selected>todos</option>
</select>
<input type="submit" name="Submit" value="Enviar">
</form>
</body>
</html>
-Página resultados:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!--#include file="Connections/formulario.asp" -->
<%
Dim Recordset1__MMColParam
Recordset1__MMColParam = "1"
If (Request.QueryString("buscar") <> "") Then
Recordset1__MMColParam = Request.QueryString("buscar")
End If
%>
<%
Dim Recordset1
Dim Recordset1_numRows
Set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_formulario_STRING
Recordset1.Source = "SELECT * FROM formulario WHERE Nombre = '" + Replace(Recordset1__MMColParam, "'", "''") + "'"
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 1
Recordset1.Open()
Recordset1_numRows = 0
%>
<%
Dim Repeat1__numRows
Dim Repeat1__index
Repeat1__numRows = 10
Repeat1__index = 0
Recordset1_numRows = Recordset1_numRows + Repeat1__numRows
%>
<html>
<head>
<title>Documento sin título</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="37%">Nombre</td>
<td width="63%">Apellidos</td>
</tr>
<%
While ((Repeat1__numRows <> 0) AND (NOT Recordset1.EOF))
%>
<tr>
<td><%=(Recordset1.Fields.Item("Nombre").Value)% ></td>
<td><%=(Recordset1.Fields.Item("Apellidos").Value) %></td>
</tr>
<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
Recordset1.MoveNext()
Wend
%>
</table>
</body>
</html>
<%
Recordset1.Close()
Set Recordset1 = Nothing
%> |