Home  >  Article  >  Backend Development  >  php mysql user registration login code_PHP tutorial

php mysql user registration login code_PHP tutorial

WBOY
WBOYOriginal
2016-07-20 11:08:321107browse

php mysql user registration and login code This is a user registration and login code implemented using php and mysql database. It is also a relatively simple and practical user registration program. At the same time, a verification code program is added when the user logs in, which is much safer.

php tutorial mysql tutorial user registration login code
This is a user registration and login code implemented using php and mysql database tutorial. It is also a relatively simple and practical user registration program. At the same time, a verification code program is added when the user logs in, which is much safer.
*/
?>





Add users in the background

require_once("config.php");
if(isset($_post["submit2"])){
mysql_select_db('a0807000225'); //This is a database table
$author=$_session["user_name"];
define(all_ps tutorial,"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('Add successfully');location.href='yonghuzc.php'</script>";
}else{
echo"<script> alert('Add failed');location.href=''yonghuzc.php'</script>";
}
}
}

?>


www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/444870.htmlTechArticlephp mysql user registration login code This is a user registration and login code implemented using php and mysql database. The function is also a relatively simple and practical user registration program. Also add...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn