Modificare il file:
\Buoni_Spesa_2015\Modifica_Movimento.asp
<%@LANGUAGE = VBScript%> <% Dim sc, cn, rs sc = "driver={Microsoft Access Driver (*.mdb)};dbq=" Set cn = Server.CreateObject("ADODB.Connection") cn.Open sc & Server.MapPath ("/mdb-database/database/Buoni_Spesa_2015.mdb") Set rs = Server.CreateObject("ADODB.Recordset") Dim id id = Request.QueryString("id") %> <html> <head> <title>Modifica un Buono Spesa</title> <style type="text/css"> .c { color: #C60; } .v { color: #FFF; } </style> </head> <body> <h1>Modifica un Movimento</h1> <form method="post" action="modifica_movimento.asp?id=<%=id%>"> Seleziona il proprietario del Buono:<br><br> <select name="movimento" onchange="location.href='modifica_movimento.asp?id='+this.value"> <option value=""></option> <% rs.Open "SELECT * FROM Buoni_Spesa ORDER BY N_Buono_ID ASC", cn, 1 While rs.EOF = False %> <option value="<%=rs("N_Buono_id")%>"><%=rs("Cognome_Nome")%></option> <% rs.MoveNext Wend rs.Close %> </select><br><br> <% If id <> "" Then rs.Open "SELECT * FROM Buoni_Spesa WHERE N_Buono_ID = " & id, cn, 1 'rs.Open "SELECT * FROM movimenti WHERE N_Buono = " & id, cn, 1 %> Cognome e Nome<br> <input type="text" name="M_Cognome_Nome" maxlength="50" value="<%=rs("Cognome_Nome")%>"> <br><br> Importo<br> <input type="number" name="M_Importo" maxlength="8" value="<%=rs("Importo")%>"> <br><br> Durata del Buono<br><br> <input type="text" name="M_Durata" maxlength="15" value="<%=rs("Durata")%>"> <br><br> <input type="submit" name="modifica" value="Modifica un Movimento"> </form> <% rs.Close End If If Request.Form("modifica") <> "" Then Dim nome nome = Request.Form("nome") If nome = "" Then %> <p>Specifica il Cognome e Nome</p> <% Else Dim SQL SQL = "SELECT * FROM autori WHERE aut_id = " & id rs.Open SQL, cn, 3, 3 rs("aut_nome") = nome rs.Update rs.Close %> <p><h1 class="c">Modifica effettuata con successo!</h1></p> <p> <% End If End If %> </p> <p><a href="index.html"><img src="images/Stampa_buono.png" width="150" height="100"></a><img src="images/bianco.jpg" width="80" height="80"><a href="index.html"><img src="images/Esci.png" width="90" height="90"></a></p> </body> </html> <% Set rs = Nothing cn.Close Set cn = Nothing %>
[
Íàçàä
]