home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
sau9.org
/
sau9.org.zip
/
sau9.org
/
mathapp
/
student_confirm.asp
< prev
next >
Wrap
Text File
|
2002-11-20
|
2KB
|
67 lines
<%@ Language=VBScript %>
<%
Response.Buffer = True
Function ChkString(string)
If string = "" Then string = " "
ChkString = Replace(string, "'", "''")
End Function
set tn = request.form("tn")
response.write "<table> <tr> <Td><Font face=tahoma size=4><h2> Student Confirmation "
response.write "</td><td> <img src=math.gif width=140></td></tr></table>"
Dim iCount
iCount= Request("Count")
filePath = Server.MapPath("math_proj.mdb")
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & filePath
Dim iLoop
for iLoop = 0 to iCount
' Receiving values from Form
strID=iLoop & ".id"
id = ChkString(Request.Form(strID))
strfname=iLoop & ".fname"
fname=request.Form(strfname)
strlname=iLoop & ".lname"
lname =ChkString(Request.Form(strlname))
strgrade=iLoop & ".grade"
grade=ChkString(Request.Form(strgrade))
strPassword=iLoop & ".Password"
Password=ChkString(Request.Form(strpassword))
strteacherlast=iLoop & ".teacherlast"
teacherlast=ChkString(Request.Form(strteacherlast))
strteacherfirst=iLoop & ".teacherfirst"
teacherfirst=ChkString(Request.Form(strteacherfirst))
sql_update = "UPDATE tblStudent set idStudent='" & id & "', txtFName='"
sql_update=sql_update & fname & "', txtLName='"
sql_update=sql_update & lname & "', txtgrade='"
sql_update=sql_update & grade & "', pwStudent='"
sql_update=sql_update & password & "' WHERE idstudent="
sql_update=sql_update & id
'response.write sql_update
'response.write "<br>Loop=" & iLoop
'response.write "<br> Count=" & iCount
conn.Execute (sql_update)
' Done. Close the connection
next
%>
Your questions have been edited. <a href=student_admin.asp>Review </a> the questions.
</html>