Update med denne form
HejsaJeg skal bruge et stykke kode der opdaterer en række for initialer = det fra formen.
Min form ser således ud:
<form method="POST" action="admin.asp" name="Gem">
<%
Set myConn = Server.CreateObject("ADODB.Connection")
strSQL = "SELECT * FROM brugere WHERE (ID = " & Request.QueryString("id") & ")"
myConn.Open tempConn
Set rs = myConn.Execute(strSQL)
If Not (rs.BOF Or rs.EOF) Then
Response.Write "<table width=450 cellpadding=1>"
Response.write "<tr class=text bgcolor=#C2B26A><td colspan=8>Opdater telefon databasen</td></tr>"
Response.write "<tr class=subheader><td>Efternavn</td><td>Fornavn</td><td>Tlf</td><td>Initialer</td><td>Afdeling</td><td>Stilling</td><td>Vær.nr.</td><td colspan=2>status</td>"
do While Not rs.EOF
Response.Write "<tr><td><input size=12 type=text name=Efternavn value=""" & rs("Efternavn") & """></td>"
Response.Write "<td><input size=10 type=text name=Fornavn value=""" & rs("Fornavn") & """></td>"
Response.Write "<td><input size=3 type=text name=Telefonnummer value=""" & rs("Telefonnummer") & """></td>"
Response.Write "<td><input size=3 type=text name=Initialer value=""" & rs("Initialer") & """></td>"
Response.Write "<td><input size=8 type=text name=Afdeling value=""" & rs("Afdeling") & """></td>"
Response.Write "<td><input size=10 type=text name=Stilling value=""" & rs("Stilling") & """></td>"
Response.Write "<td><input size=5 type=text name=Vaerelsesnummer value=""" & rs("Vaerelsesnummer") & """></td>"
Response.Write "<td><input size=7 type=text name=Status value=""" & rs("Status") & """></td></tr>"
rs.MoveNext
Loop
Response.Write "</table>"
Else
Response.Write "<p><font face=arial size=2></font></p>"
End If
myConn.Close
Set myConn = Nothing
%>
<input type="submit" value="Gem" name="Gem">
<input type="button" value="Annuller" name="Annuller" onClick="java script:history.back();">
</form>