PHP + DBM logging program (4)

Source: Internet
Author: User
Tags sendmsg
PHP + DBM logging program (4) 8. register file reg. php3
Require ("common. php3 ");
Require ("mail. php3 ");
If ($ submit ){
If ($ id = "") error ("Enter your registered username! ");
Elseif (! Eregi ("^ [0-9a-zA_Z] + $", $ id) error ("Your username cannot contain other characters! ");
Elseif ($ password = "") error ("enter your password! ");
Elseif ($ password <> $ password1) error ("your password is incorrect! ");
Elseif ($ name = "") error ("Enter your name! ");
Elseif ($ mail = "") error ("Enter your email address! ");
Else {
$ Dbm = dbmopen ("class", "w ");
If (dbmexists ($ dbm, $ id) error ("this user name has been registered with someone else! ");
Else {
$ Intro = nl2br ($ intro );
$ Data = "$ name |! :! | $ Nickname |! :! | $ Mail |! :! | $ Home |! :! | $ Oicq |! :! | $ Icq |! :! | $ Add |! :! | $ Tel |! :! | $ Birth |! :! | $ Job |! :! | $ Intro |! :! | $ Sex ";
Dbminsert ($ dbm, $ id, $ data );
$ Pwd = dbmopen ("password", "w ");
Dbminsert ($ pwd, $ id, $ password );
}
Dbmclose ($ dbm );
$ Sendmsg = "welcome to register n ";
$ Sendmsg. = "The following is your registration information: n ";
$ Sendmsg. = "user name: $ idn user password; $ passwordn ";
$ Sendmsg. = "= "================== ";
$ Sendmsg. = "registration name: $ namen registration nickname: $ nicknamen registration Email: $ mailn homepage address: $ homen ";
$ Sendmsg. = "your OICQ: $ oicqn your ICQ: $ icqn contact address: $ addn Contact number: $ teln ";
$ Sendmsg. = "your birthday: $ birthn Your Career: $ jobn your gender; $ sexn your profile: n $ intronn ";
$ Sendmsg. = "= "==================== ";
$ Sendmsg. = "welcome to register" Shenzhen high school 2000 High School (12) class transcript ";
$ Sendmsg. = "login address: http://5212.net/class ";
Mail2 ("Welcome to register the transcript of the 2000 Shenzhen high school (12)", $ sendmsg, $ mail );
Header ("Location: index. php3 ");
}
} Else {
?>
Login user registration
























}
?>

9. create the database file run. php3

$ Dbm = dbmopen ("class", "c ");
Dbmclose ($ dbm );
$ Dbm = dbmopen ("password", "c ");
Dbmclose ($ dbm );
?>

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.