Php + mysql implements user registration and login, and mysql User registration. Php + mysql implements user registration and login methods. mysql User registration examples in this article describe how php + mysql implements user registration and login. Share it with you for your reference. The specific analysis is as follows: php + mysql implements user registration and login, mysql User registration
This example describes how to implement user registration and login in php + mysql. Share it with you for your reference. The specific analysis is as follows:
This is a user registration and login code implemented using php and mysql databases. it is also a simple and practical user registration program, and also adds the verification code program for user logon, the code is as follows:
The code is as follows:
Add users in the background
<? Php
Require_once ("config. php ");
If (isset ($ _ post ["submit2"]) {
Mysql_select_db ('a0807000225 '); // This is a database table.
$ Author = $ _ session ["user_name"];
Define (all_ps, "jinquan ");
Echo $ username = $ _ post ["username"];
Echo $ password = md5 ($ password = $ _ post ["password"]. all_ps );
Echo"
";
If ($ username ){
If ($ password ){
$ Str = "insert into 'dx _ user_list '('uid', 'M _ id', 'username', 'password') values (ascii (null ), '1', '$ username',' $ password ');";
$ Rs = mysql_query ($ str, $ conn );
Mysql_close ($ conn );
}
If ($ rs ){
Echo "script" alert ('added successfully '); location. href = 'yonghuzc. php' script ";
} Else {
Echo "script" alert ('add failed'); location. href = ''yonghuzc. php' script ";
}
}
}
?>
I hope this article will help you with php programming.
Examples in this article describes how to implement user registration and login in php + mysql. Share it with you for your reference. The specific analysis is as follows :...