<%@ Language=vbscript%>
<HTML>
<HEAD>
<meta name= "generator" content= "Microsoft Visual Studio 6.0" >
</HEAD>
<BODY>
<%
If Request.ServerVariables ("http_method") = "POST" and Request.Form ("Submit") <> "skip to" then
' If you submit the form content by post
Set Conn=server. CreateObject ("Adodb.connection")
Conn. Connectionstring= "Dsn=testsys"
Conn. Open
Strstid=request.form ("Stid")
Strstname=request.form ("Stname")
If Request.Form ("submit") = "Join" Then
' If a request to join student information is performed
Strsql= "SELECT * from Studentinfo where stid= '" & Strstid & "'"
' Studentinfo the student's record in the table of the database according to the student number to be added
Set Mrs1=conn. Execute (strSQL)
If not (mrs1. BOF and Mrs1. EOF) Then
' If the student number you want to join already exists, you are prompted to re-enter the information
Response.Write "The school number already exists, please re-enter the student information <br>"
Response.Write "<a href=taddstudent.asp?page=" & Request ("page") & "&stname=" & Strstname & " &stid= "& Strstid &" > Return </a> "
Else
' If the student number you want to join does not exist, add the student information to the database
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