PHP + DBM logging program (2)

Source: Internet
Author: User
Tags chop php3 file
PHP + DBM logging program (2) 3. delete member del. php3 <br/> & lt ;? <Br/> require (& quot; common. php3 & quot;); 3. delete member del. php3
Require ("common. php3 ");
$ Id = chop ($ id );
If (! Isset ($ id) error ("Enter the user id to delete! ");
Elseif ($ pwd <> $ adminpass) error ("The administrator password is incorrect! ");
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 ){
?>

Upload record error





Upload record error


Error cause:

Click here to return to the previous page to check whether your input is correct.


[Back to previous page]

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


}
?>

5. log on to the login. php3 file.
Require ("common. php3 ");
If ($ submit ){
$ Id = chop ($ id );
If ($ id = "") error ("Enter your user name! ");
Else {
$ Dbm = dbmopen ("password", "r ");
If (! Dbmexists ($ dbm, $ id) error ("this user name is not available! ");
Else {
$ Pass = dbmfetch ($ dbm, $ id );
If ($ pass = $ password ){
Setcookie ("login", $ id, time () + 31536000 );
Header ("location: index. php3 ");
} Else error ("your password is incorrect! If you forget your password, use the forgot password function! ");
}
Dbmclose ($ dbm );
}
} Else {
?>


Shenzhen high school 2000 High School (12) class transcript: All rights reserved: Xin? @ Shenzhen high school 2000 High School (12)










Transcript of class 12 of the 2000 Shenzhen High School






}
?>



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.