This yearbook originally for our class, because the server does not have MySQL support, chose dbm
There is no dbm program in China, and there is hardly any foreign
Spent an evening in the case of hardly any reference written out
Now it's out.
is a very good example of dbm usage
1, INDEX.PHP3
if ($login) {
?>
<title>Shenzhen Middle School 2000 session High School (12) class Yearbook</title>
Shenzhen Middle School 2000 session High School (12) class Yearbook
| Name |
Nickname |
OICQ |
e-mail address |
More information |
$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 Yearbook v1.0 version program production: y10k
Welcome visit: Http://www.best4cn.com
}else header ("location:login.php3");
?>
2, change the password changepwd.php3
Require ("common.php3");
if ($submit) {
$id = $login;
if ($id ==false) error ("Please login and then change password");
else{
$data =dbmopen ("Password", "w");
$pass =dbmfetch ($data, $login);
if ($password = = $pass) {
if ($password 2== $password 1) {
Dbmreplace ($data, $id, $password 2);
Header ("location:index.php3");
}else error ("You entered the password two times not the same AH!") ");
}else error ("Sorry, you entered the original password error, cannot change the password!") ");
}
}else{
?>
href= "Style.css" rel=stylesheet>
}
?>
http://www.bkjia.com/PHPjc/316232.html www.bkjia.com true http://www.bkjia.com/PHPjc/316232.html techarticle This yearbook originally to our class use, because the server does not have MySQL support, chose dbm Domestic has not what DBM program, abroad also almost did not spend a night, in almost no ...