This sort record was originally used for our class. because the server does not support MySQL, we chose dbm. there is no dbm program in China, and it took almost no night abroad, I wrote it out with almost no reference. it is a very good example of dbm usage. 1. index. php3 & lt ;? If ($ login ){? & Gt; & lt; HTML & gt; & lt; HEAD & g this record was originally used for our class. because the server does not support MySQL, dbm is selected.
There is no dbm program in China, and there is almost no dbm program abroad.
It took me one night to write it out without any reference.
Published now
Is a very good dbm use example
1. index. php3
If ($ login ){
?>
Transcript of class 12 of the 2000 Shenzhen High School
Transcript of class 12 of the 2000 Shenzhen High School
Name |
NickName |
OICQ |
Email address |
Details |
$ Dbm = dbmopen ("class", "r ");$ Key = dbmfirstkey ($ dbm );While ($ key ){$ Data = dbmfetch ($ dbm, $ key );$ Info = explode ("|! :! | ", $ Data );Echo"
$ Info [0] |
$ Info [1] |
$ Info [4] |
$ Info [2] |
Click to view |
";$ Key = dbmnextkey ($ dbm, $ key );}?>
Modify information | change password | click to exit |
Ex tutorial v1.0 program production: y10k
Welcome to: http://www.best4cn.com
} Else header ("location: login. php3 ");
?>
2. change the password's changepwd. php3
Require ("common. php3 ");
If ($ submit ){
$ Id = $ login;
If ($ id = false) error ("please log on and change 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 password you entered twice is different! ");
} Else error ("Sorry, the original password you entered is incorrect. you cannot change the password! ");
}
} Else {
?>
Href = "style.css" rel = stylesheet>
}
?>