PHP+MYSQL realization of User Registration login method
This article mainly introduced the Php+mysql realizes the user registers the login method, may realize the simple user registration login function, has the certain reference value, needs the friend may the reference under
This paper describes the method of Php+mysql to realize user registration and landing. Share to everyone for your reference. The specific analysis is as follows:
This is a use of PHP and MySQL database implementation of the user registration and login code, the function is relatively simple and practical user registration program, but also added the user login Verification Code program, this is a lot of security, the code is as follows:
The code is as follows:
<title>Add users in the background</title>
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 "";
}else{
echo "";
}
}
}
?>
I hope this article is helpful to everyone's PHP programming.
http://www.bkjia.com/PHPjc/975895.html www.bkjia.com true http://www.bkjia.com/PHPjc/975895.html techarticle php+mysql Realization of User Registration login method This article mainly introduced the PHP+MYSQL realization User Registration Login method, can realize the simple user registration login function, has the certain reference ...