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