php 使用者註冊頁面代碼_PHP教程

來源:互聯網
上載者:User
php 使用者註冊頁面代碼這款使用者註冊程式是一款包括有資料庫,註冊頁面,註冊js 驗證是一款完整理的php+mysql實用的使用者註冊代碼。

php教程 使用者註冊頁面代碼
這款使用者註冊程式是一款包括有資料庫教程,註冊頁面,註冊網頁特效 驗證是一款完整理的php+mysql教程實用的使用者註冊代碼。
*/

$conn=mysql_connect('localhost','root','root')or die('資料庫連接錯誤');
mysql_select_db('demo',$conn);
mysql_query("set names 'gbk'");
//檢測會員名稱是否存在

if($_post[username]){

$sql="select * from users where username='$_post[username]'";

$res=mysql_query($sql)or die("查詢失敗!");
$us=$_get[name];
echo $us."222222";
$ps教程= md5($_post[password]);
$sex=$_post['sex'];
$age=$_post['age'];
$qq=$_post['qq'];
$phone=$_post['phone'];
$email=$_post['email'];
$address=$_post['address'];
if(is_array(mysql_fetch_row($res))){
echo "該會員名已經存在!";
}else{
$sql="insert into users (username,password,sex,age,qq,phone,email,address) values ('$us','$ps',$sex,$age,$qq,'$phone','$email','$address')";
echo $sql;
mysql_query($sql)or die("註冊失敗");
echo "";
}
}
?>


/*

drop table if exists `users`;
create table `users` (
`id` int(10) not null auto_increment,
`username` varchar(50) not null,
`password` varchar(50) not null,
`sex` int(1) not null default '0',
`age` int(10) not null,
`qq` int(15) default null,
`phone` varchar(50) default null,
`email` varchar(50) default null,
`address` varchar(100) default null,
primary key (`id`)
) engine=innodb auto_increment=4 default charset=gbk;

-- ----------------------------
-- records of users
-- ----------------------------
insert into `users` values ('1', 'admin', '21232f297a57a5a743894a0e4a801fc3', '0', '22', '379559090', '666666', '666666@163.com', '武漢');
insert into `users` values ('2', 'root', '63a9f0ea7bb98050796b649e85481845', '0', '20', '1244249796', '8888888', '8888888@163.com', '中國');
insert into `users` values ('3', 'www.bKjia.c0m', '96e79218965eb72c92a549dd5a330112', '0', '20', '1244249796', '8888888', '8888888@163.com', '中國');


本教程下載地址

http://down.bKjia.c0m/down/code/php/xinwenxitong/2010/0812/20183.html

http://www.bkjia.com/PHPjc/632046.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/632046.htmlTechArticlephp 使用者註冊頁面代碼這款使用者註冊程式是一款包括有資料庫,註冊頁面,註冊js 驗證是一款完整理的php+mysql實用的使用者註冊代碼。 php教程...

  • 聯繫我們

    該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

    如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.