PHP + DBM logging program _ PHP-php Tutorial

Source: Internet
Author: User
This sort record was originally used for our class. because the server does not support mysql, we chose dbm. there is no dbm program in China, and it took almost no night abroad, I wrote it out with almost no reference. it is a very good example of dbm usage. 1. index. php3? If ($ login ){? HTMLHEADTITLE: the transcript of Shenzhen Middle School 2000 was originally used for our class. because the server does not support mysql, dbm is selected.
There is no dbm program in China, and there is almost no dbm program abroad.
It took me one night to write it out without any reference.
Published now
Is a very good dbm use example

1. index. php3
If ($ login ){
?>


Transcript of class 12 of the 2000 Shenzhen High School





Transcript of class 12 of the 2000 Shenzhen High School





















$ Dbm = dbmopen ("class", "r ");$ Key = dbmfirstkey ($ dbm );While ($ key ){$ Data = dbmfetch ($ dbm, $ key );$ Info = explode ("|! :! | ", $ Data );Echo" ";$ Key = dbmnextkey ($ dbm, $ key );}?>
Name NickName OICQ Email address Details
$ Info [0] $ Info [1] $ Info [4] $ Info [2] Click to view
Modify information | change password | click to exit

Ex tutorial v1.0 program production: y10k

Welcome to: http://www.best4cn.com </a>



} Else header ("location: login. php3 ");
?>

2. change the password's changepwd. php3
Require ("common. php3 ");
If ($ submit ){
$ Id = $ login;
If ($ id = false) error ("please log on and change 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 password you entered twice is different! ");
} Else error ("Sorry, the original password you entered is incorrect. you cannot change the password! ");
}
} Else {
?>


Href = "style.css" rel = stylesheet>



}
?>
Related Article

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.