Home > Backend Development > PHP Tutorial > PHP+DBM student recruitment program 1

PHP+DBM student recruitment program 1

WBOY
Release: 2016-07-29 08:33:55
Original
960 people have browsed it

This classmate record was originally for our class. Because the server did not support MySQL, we chose dbm.
There are no dbm programs in China, and there are almost none abroad. It took me an entire night to write it with almost no reference.
Now published
is a very good example of dbm usage
1, index.php3
if($login){
?>


Shenzhen Middle School High School Class (12) Class of 2000



Shenzhen Middle School Class of 2000 (12th) Classmates



width=18% bgcolor="#336699">OICQ



$dbm=dbmopen("class","r");
$key = dbmfirstkey($dbm);
while ($ key) {
$data=dbmfetch($dbm, $key);
$info=explode("|!:!|",$data);
echo "< td width=19%>Click to view";
$key = dbmnextkey($ dbm, $key);
}
?>



Name< ;/FONT> < ;font color="#FFFFFF">E-mail address Details Information
$info[0] $info[1]$info[4]$info[2]
Modify information||Change password||Click to exit

Ex classmate record v1.0 versionProgram production: y10k

Welcome to: http://www.best4cn.com < ;/p>

}else header("location:login.php3");
?>
2. Change password changepwd.php3
require("common.php3");
if($submit){
$id=$login;
if($id==false)error("Please log in before changing your password");
else{
$ data=dbmopen("password","w");
$pass=dbmfetch($data,$login);
if($password==$pass){
if($password2==$password1){
dbmreplace ($data,$id,$password2);
header("location:index.php3");
}else error("The passwords you entered twice are different! ");
}else error("Sorry, the original password you entered is wrong and the password cannot be changed!");
}
}else{
?>


href="style.css" rel=stylesheet>




    
        
        
        
      
        
        
        
      
        
        
        
      
        
        
        
      
        
        
color=#ffffff>用户修改密码
  
          

老的密码


        
     
           class=stedit name=password>
        
  
          

新的密码


        
     
           class=stedit name=password1>
        
  
          

重复密码


        
     
           class=stedit name=password2>
        
  
          
  
            

  
              
                   
              
            


          

                                                                                                                                                       
}
?>

The above introduces the PHP + DBM student registration program 1, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.


Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template