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 Class of 2000 (12th) Classmates
Name< ;/FONT> | width=18% bgcolor="#336699">OICQ< ;font color="#FFFFFF">E-mail address | Details Information | ||
$info[0] | $info[1] | $info[4] | $info[2] | < td width=19%>Click to view|
Modify information||Change password||Click to exit |
Ex classmate record v1.0 versionProgram 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{
?>