Home  >  Article  >  Backend Development  >  在注册用户时用两个条件限制,该如何处理

在注册用户时用两个条件限制,该如何处理

WBOY
WBOYOriginal
2016-06-13 12:43:58905browse

在注册用户时用两个条件限制
我设计了一个教师注册信息的功能。教师需输入与数据库中对应的姓名和职工号才可注册成功,问题是,如果我只限制与数据库中的姓名相对应便可注册的话,就可以正常注册,如果我限制姓名和职工号两个条件的话,即使我输入正确的姓名和职工号,系统也执行“你输入的信息有误,不属于计算机学院教师”这句。是不是我写的语句有问题?这是我的前台

nbsp;html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><br>
<br>
<br>
<meta><br>
<title>教师注册页面</title><br>
<style><br />
<!--<br />
.STYLE1 {<br />
	font-size: 14px;<br />
	color: #FF0000;<br />
}<br />
.STYLE2 {color: #FF0000}<br />
.STYLE3 {font-size: 14px}<br />
.STYLE4 {font-size: 14px; color: #000000; }<br />
.STYLE5 {font-size: 12px}<br />
--><br />
</style><br>
<br>
<br>
<br>
<?php  <br />
//######################教师注册##########################<br>
  include "conn.php";<br>
  include "header.php";?><br>
 <p><br>
</p><br>

  
  
     
      
    
 
      
      
    
 
      
      
    
 
      
      
    
 
      
--->教师注册

        
姓名:

      
 
        *请输入您的真实姓名 

        
职工号:

      
 
        *请输入您的职工号 

        
密码:

      
 
        *输入密码,长度为3-16位  

        
确认密码:
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn