Home >Backend Development >PHP Tutorial >PHP+DBM student recruitment program (1)_PHP tutorial

PHP+DBM student recruitment program (1)_PHP tutorial

WBOY
WBOYOriginal
2016-07-21 16:03:37927browse

This classmate record was originally used by 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, with almost no reference. Written
now published
is a very good example of dbm usage

1. index.php3
if($login){
? > "text/css">
A {text-decoration: none; color: #336699; font-family: "宋体"; font-size: 9pt}
A:hover {text-decoration: underline; color: #FF0000; font-family: "宋体"; font-size: 9pt}
body {font-family: "宋体", "serif"; font-size: 9pt}
td {font-family : "宋体", "serif"; font-size: 9pt}
input {font-size: 9pt}
p {font-size: 9pt}
br {font-size: 9pt}
tr {font-size: 9pt}
table {font-size: 9pt}
INPUT { FONT-FAMILY: arial, 宋体; FONT-SIZE: 9pt; PADDING-TOP: 3px }
INPUT. text {
BACKGROUND-COLOR: #f0f0f0; BORDER-BOTTOM: #101010 1px solid; BORDER-LEFT: #101010 1px solid; BORDER-RIGHT: #101010 1px solid; BORDER-TOP: #101010 1px solid; COLOR: #000000
}
INPUT.file {
BACKGROUND-COLOR: #f0f0f0; BORDER-BOTTOM: #101010 1px solid; BORDER-LEFT: #101010 1px solid; BORDER-RIGHT: #101010 1px solid; BORDER-TOP: #101010 1px solid; COLOR: #000000
}
SELECT {
BACKGROUND-COLOR: #f0f0f0; BORDER-BOTTOM: #101010 1px solid; BORDER-LEFT: #101010 1px solid; BORDER-RIGHT: #101010 1px solid; BORDER-TOP: #101010 1px solid; COLOR: #000000
}
TEXTAREA {
BACKGROUND-COLOR: #f0f0f0; BORDER-BOTTOM: #101010 1px solid; BORDER-LEFT: #101010 1px solid; BORDER-RIGHT: #101010 1px solid; BORDER-TOP: #101010 1px solid; COLOR: #000000
}
.stedit { font-size: 9pt; border-left : 1px solid #4a3163;
border-right: 1px solid #4a3163; border-top: 1px solid #4a3163;
border-bottom: 1px solid #000066 }
.stbtm { background-color: # cococo; color: #000000; font-size: 9pt; height: 20px;
border-left: 1px solid #ffffff; border-right: 1px solid #665b8e;
border-top: 1px solid #ffffff; border-bottom: 1px solid #665b8e }
.ddd {COLOR: #ffffff; FILTER: glow(color=black,strength=1); FONT-SIZE: 9pt; LINE-HEIGHT: 13pt; POSITION: relative; WIDTH : 100%}




Shenzhen Middle School Class of 2000 (12th) Classmates



">Name
;Details

$dbm=dbmopen("class", "r");
$key = dbmfirstkey($dbm);
while ($key) {
$data=dbmfetch($dbm, $key);
$info=explode(" |!:!|",$data);
echo "";
$key = dbmnextkey($dbm, $key);
}
?>


NickName< /td> 27% bgcolor="#336699">Email address
$info[0]$info[1]$info [4]$info[2]Click to view
Modify data|| Change password||Click to exit

Ex Classmate Record v1.0 versionProgram production: y10k

Welcome to: http://www.best4cn.com



}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>
        
  
          
  
            

  
              
                   
              
            


          

                                            BODY> ;
}
?>




http://www.bkjia.com/PHPjc/316232.html

www.bkjia.com

http: //www.bkjia.com/PHPjc/316232.htmlTechArticleThis classmate record was originally used for our class. Because the server did not support mysql, we chose dbm. There is nothing in China. dbm program, it took almost no one night abroad, almost no time...
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