⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 insertstu-1.jsp

📁 自己做的一份在线考试系统
💻 JSP
字号:
<%@ page contentType="text/html; charset=gb2312" import="java.sql.*" errorPage="errorpage.jsp" %>
<jsp:useBean id="insert" scope="page" class="BeanPage.loginBean"/>
<jsp:useBean id = "connDbBean" scope = "application" class = "BeanPage.loginBean"/>
<html>
<head>
<title>提示</title>
<style type="text/css">
<!--
.STYLE1 {
	font-size: large;
	font-weight: bold;
	color: #00FF00;
}
-->
</style>
</head>
<body>
    <p>
      <%      boolean flag =false;
             String insertName = request.getParameter("insertTextName");
             byte name [] = insertName.getBytes("ISO-8859-1");
             insertName = new String(name);
             String insertNum = request.getParameter("insertTextNum");
             String insertPass = request.getParameter("insertTextPassword");
	if(insertName==""|| insertNum==""||insertPass==""){
           out.println("input wrong!");
         }
        else if(insertName!="null"&& insertNum!="null"&& insertPass!="null"){  
                 String rs= "SELECT * FROM stu_login WHERE number= '"+insertNum+"'" ;
                 ResultSet RS_result = connDbBean.executeQuery(rs);
        if(RS_result.next())
        {
            flag = true;
        }
        RS_result.close();
                 if(flag){
                  out.println("please modify the number you input!");
                   }
                   else{
                     String sql = "insert into stu_login values ('"+insertName+"','"+insertNum+"','"+insertPass+"')"; 
                     insert.insertSql(sql); 
                     out.println("modify the student information success!");
                 }
                 }
	 %>
	 
   
	 
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -