Php registration page code (mysql + php) _ PHP Tutorial

Source: Internet
Author: User
Php registration page code (mysql + php ). Php registration page code (mysql + php) is a user registration code that uses the mysqlphp instance. it is relatively simple to save the html submitted data to the mysql database. Php Tutorial registration php registration page code (mysql + php) this is a user registration code that uses mysql php instances, relatively simple, is to save html submitted data to the mysql database.

Php Tutorial registration page code (mysql tutorial + php)
This is a user registration code that uses mysql php instances.
Save the submitted data to the mysql database.
*/
Include ('global. php ');

If ($ _ post ['sub']) {
$ User = $ _ post ['username'];
$ Pwd = md5 ($ _ post ['password1 ']. $ user );
$ Email = $ _ post ['email '];
$ Q = $ mysql-> query ("insert into 'hl '. 'hl _ member' ('id', 'username', 'password', 'Email ') values (null,' $ user', '$ pwd ', '$ email ');");
If ($ q ){
Setcookie ('login', $ user );
$ Prompt_msg-> p ('Congratulations, Dear member, you have registered successfully! ', 'Index. php',' go to the home page. ', 'Http: // www. bKjia. c0m',' go to the Forum first! ');
} Else {
$ Prompt_msg-> p ('Sorry, the system is faulty! ');
}
}
?>









Database structure

Create table 'hl '. 'hl _ member '(
'Id' int (4) not null auto_increment comment 'autocode ',
'Username' varchar (100) not null comment 'user name ',
'Password' varchar (200) not null comment 'user password ',
'Answer' varchar (100) not null comment' secret protection response ',
'Question 'varchar (100) not null comment 'confidentiality question ',
'Email 'varchar (100) not null comment 'mail ',
'Realname' varchar (200) not null comment' logon limited ',
'Birthday' date not null comment' birthdate ',
'Telphone' varchar (20) not null comment' phone number ',
'QQ' varchar (15) not null comment 'qq number ',
'Count' int (1) not null comment' logon limited ',
'Active' int (1) not null comment 'active ',
Primary key ('id ')
) Engine = innodb character set gb2312 collate gb2312_chinese_ci;

Login (mysql + php) is a user registration code that uses mysql php instances. it is relatively simple to save html submitted data to the mysql database. Php Tutorial registration...

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.