Network examination Room (1) (Turn) Logon.asp

Source: Internet
Author: User
<%@ 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
Related Article

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.