PHP+DBM's Yearbook Program

Source: Internet
Author: User
Keywords PHP+DBM's Yearbook Program
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





















                    $DBM =dbmopen ("Class", "R"); $key = Dbmfirstkey ($DBM);   while ($key) {$data =dbmfetch ($dbm, $key);   $info =explode ("|!:!|", $data); echo " "; $key = Dbmnextkey ($dbm, $key); }?>      
NameNicknameOICQe-mail addressMore information
$info [0] $info [1] $info [4] $info [2] Click to view
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>



}
?>
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.