<%@ Language=vbscript%>
<%
If Request.ServerVariables ("http_method") = "POST" Then
If Request.Form ("submit") = "Enter 1" then
' The student enters the network examination room the processing
Set Conn=server. CreateObject ("Adodb.connection")
Conn. Connectionstring= "Dsn=testsys"
' Connect and open the database
Conn.Open
Strsql= "SELECT * from Studentinfo where stid= '" & Request.Form ("Stid") & "' and Stname= '" & Request.Form ("Stna Me ") &" ' "
Set Mrs=conn. Execute (strSQL)
If not mrs.bof and not mrs.eof then
' If the student's record exists in the database, enter the online exam
' Using the session property to store student names and school numbers
Session ("Stid") =request.form ("Stid")
Session ("Stname") =request.form ("Stname")
Response.Redirect "Stselectsub.asp"
Set mrs=nothing
Else
' If the student's information does not exist in the database, the displayed page is still logon.asp and prompts for information
Response.Write "Student name and school number input Error!! "
End If
Conn. Close
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service