Yearbook How to write PHP+DBM Yearbook program 2

Source: Internet
Author: User
Tags chop administrator password
3. Delete Member Del.php3
Require ("common.php3");
$id =chop ($id);
if (!isset ($id)) error ("Please enter the user ID to delete! ");
ElseIf ($pwd <> $adminpass) error ("Administrator password is wrong! ");
else{
$data =dbmopen ("Class", "W");
Dbmdelete ($data, $id);
Dbmclose ($data);
$data =dbmopen ("Password", "w");
Dbmdelete ($data, $id);
Dbmclose ($data);
Header ("location:index.php3");
}
?>
4. public file Common.php3
$adminpass = "Test";
Function error ($MSG) {
?>

<title>Yearbook Error</title>





Yearbook Error


Cause of Error:

Please click here to go back to the previous page to check if your input is wrong


[Back to previous page]


Style= "font-size:9pt" >copyright 200x y10k. Allrights reserved.


}
?>
5. login File Login.php3
Require ("common.php3");
if ($submit) {
$id =chop ($id);
if ($id = = "") Error ("Please enter your user name!") ");
else{
$DBM =dbmopen ("password", "R");
if (!dbmexists ($DBM, $id)) error ("No this user name!") ");
else{
$pass =dbmfetch ($dbm, $id);
if ($pass = = $password) {
Setcookie ("Login", $id, Time () +31536000);
Header ("location:index.php3");
}else error ("Your password is wrong!") If you forget your password, please use the forgot password feature! ");
}
Dbmclose ($DBM);
}
}else{
?>


<title>Shenzhen Middle School 2000 session High School (12) class Yearbook::: Copyright: Sing @ Shenzhen Middle School 2000 High School (12) class</title>









Shenzhen Middle School 2000 session High School (12) class Yearbook






}
?>

The above describes the yearbook how to write PHP+DBM Yearbook program 2, including yearbook how to write aspects of the content, I hope that the PHP tutorial interested in a friend helpful.

  • 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.