Ciao a tutti,
ho trovato in giro il seguente script che è abbastanza interessante.
vorrei, prima di recuperare i dati, individuare il record con id e password, come posso fare?
Grazie anticipate
<%
Dim ModID
ModID = Request("id")
if ModID = "" then
ModID = 1
end if
MyDB="database.mdb"
Set conn = Server.CreateObject("ADODB.Connection")
dsnpath = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(myDB)
conn.open dsnpath
querysql="select * from AGENDA where id =" & ModID
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open querysql, conn, 3, 3
if rs.eof then
response.write "errore! ID non trovato!"
response.end
end if
%>
<html><head>
<title>Modifica i dati</title>
</head>
<form method="POST" action="salva_dati.asp">
<input type="hidden" name="id" value="<%=ModID%>">
<table>
<tr>
<td>Nome:</td><td><input type="text" name="nome" size="20" value="<%=rs("nome")%>"></td>
</tr><tr>
<td>Cognome:</td><td><input type="text" name="cognome" size="20" value="<%=rs("cognome")%>"></td>
</tr><tr>
<td>Tel:</td><td><input type="text" name="telefono" size="20" value="<%=rs("telefono")%>"></td>
</tr>
</table>
<input type="submit" value="MODIFICA DATI!">
</form>
<%
rs.close
set rs = Nothing
conn.close
Set conn = Nothing
%>
</body>
</html>