$adminpass)error("The administrator password is wrong!"); else{ $data=dbmopen("class","w" ); dbmdelete($dat"/> $adminpass)error("The administrator password is wrong!"); else{ $data=dbmopen("class","w" ); dbmdelete($dat">

Home >Backend Development >PHP Tutorial >How to write classmate registration? PHP+DBM classmate registration program 2

How to write classmate registration? PHP+DBM classmate registration program 2

WBOY
WBOYOriginal
2016-07-29 08:34:001282browse

3. Delete member del.php3
require("common.php3");
$id=chop($id);
if(!isset($id))error("Please enter the user to be deleted ID! ");
elseif($pwd<>$adminpass)error("Wrong administrator password!");
else{
$data=dbmopen("class","w");
dbmdelete($data ,$id);
dbmclose($data);
$data=dbmopen("password","w");
dbmdelete($data,$id);
dbmclose($data);
header("location: index.php3");
}
?>
4. Common file common.php3
$adminpass="test";
function error($msg){
?>
< ;head>
Error in student registration


< /table>
< table border="0" width="100%" bgcolor="#000000" cellspacing="0" cellpadding="0">


< ;/tr>
Error in classmate registration


Error reason:

Please click here to return to the previous page to check whether your input is correct


[ Return to the previous page

< p align="right">style="font-size: 9pt">Copyright 200x y10k .Allrights reserved.

}
?>
5. Login file login. php3
require("common.php3");
if($submit){
$id=chop($id);
if($id=="")error("Please enter your user name! ");
else{
$dbm=dbmopen("password","r");
if(!dbmexists($dbm,$id))error("No such user name!");
else{
$ pass=dbmfetch($dbm,$id);
if($pass==$password){
setcookie("login",$id,time()+31536000);
header("location:index.php3") ;
        }else error("Your password is incorrect! If you forget your password, please use the Forgot Password function!");
}
dbmclose($dbm);
}
}else{
?>


深圳中学2000届高中(12)班同学录:::版权所有:辛湜@深圳中学2000届高中(12)班





  
    
  
  
      
深圳中学2000届高中(12)班同学录

      
  
        

          
              
              
            
              
              
            
              
              
              
            
          
  
                
              
  
                
              

                
              
  
                
                    
                
              

        

      

    



}
?> 

以上就介绍了同学录怎么写 PHP+DBM的同学录程序2,包括了同学录怎么写方面的内容,希望对PHP教程有兴趣的朋友有所帮助。

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