国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 數(shù)據(jù)庫 > MySQL > 正文

php+mysql實現(xiàn)用戶注冊登陸的方法

2024-07-24 12:43:22
字體:
供稿:網(wǎng)友

 這篇文章主要介紹了php+mysql實現(xiàn)用戶注冊登陸的方法,可實現(xiàn)簡單的用戶注冊登錄的功能,具有一定參考借鑒價值,需要的朋友可以參考下

  

本文實例講述了php+mysql實現(xiàn)用戶注冊登陸的方法。分享給大家供大家參考。具體分析如下:

這是一款利用php與mysql數(shù)據(jù)庫實現(xiàn)的用戶注冊與登錄代碼,功能也是比較簡單實用的用戶注冊程序,同時也加了用戶登錄時驗證碼程序,這樣做就安全了很多,代碼如下:

代碼如下:<!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd">
<html xmlns="http://www.jb51.net/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=gb2312" />
<title>在后臺增加用戶</title>
</head>

<body>

<?php
require_once("config.php");
if(isset($_post["submit2"])){
mysql_select_db('a0807000225'); //這個是數(shù)據(jù)庫表
$author=$_session["user_name"];
define(all_ps,"jinquan");
echo $username=$_post["username"];
echo $password=md5($password=$_post["password"].all_ps);
echo "</br>";
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('新增成功');location.href='yonghuzc.php'</script>";
}else{
echo"<script>alert('新增失敗');location.href=''yonghuzc.php'</script>";
}
}
}
?>

 

希望本文所述對大家的php程序設(shè)計有所幫助。

發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表
主站蜘蛛池模板: 沿河| 高陵县| 溧阳市| 兴业县| 泸州市| 凯里市| 凌源市| 高阳县| 岳阳市| 万宁市| 昌宁县| 宜宾市| 唐河县| 饶平县| 梓潼县| 阳新县| 绥棱县| 杭锦后旗| 阜康市| 如皋市| 吐鲁番市| 雅江县| 和林格尔县| 山阴县| 韶山市| 沂水县| 胶南市| 和静县| 鹤岗市| 灵山县| 彭山县| 雅江县| 建阳市| 吴江市| 朝阳区| 衡山县| 美姑县| 牟定县| 宁河县| 新宾| 肃宁县|