php註冊頁面代碼(mysql+php)這是一款利用mysql php執行個體的使用者註冊代碼,比較簡單,就是把html提交過來的資料儲存到mysql資料庫。
php教程註冊頁面代碼(mysql教程+php)
這是一款利用mysql php執行個體的使用者註冊代碼,比較簡單,就是把html
提交過來的資料儲存到mysql資料庫教程。
*/
include('global.php');
if($_post['sub']){
$user = $_post['username'];
$pwd = md5($_post['password1'].$user);
$email = $_post['email'];
$q = $mysql->query("insert into `hl`.`hl_member`(`id`,`username`,`password`,`email`)values (null,'$user','$pwd','$email');");
if($q){
setcookie('login',$user);
$prompt_msg->p('恭喜您,親愛的會員,您已經註冊成功!','index.php','現在去首頁。','http://www.bKjia.c0m','先去論壇逛逛!');
}else{
$prompt_msg->p('非常抱歉,系統發生故障!');
}
}
?>
資料庫結構
create table `hl`.`hl_member` (
`id` int( 4 ) not null auto_increment comment '自動編碼',
`username` varchar( 100 ) not null comment '使用者名稱稱',
`password` varchar( 200 ) not null comment '使用者密碼',
`answer` varchar( 100 ) not null comment '密保答案',
`question` varchar( 100 ) not null comment '密保問題',
`email` varchar( 100 ) not null comment 'email',
`realname` varchar( 200 ) not null comment '登入限制',
`birthday` date not null comment '出生日期',
`telephone` varchar( 20 ) not null comment '電話號碼',
`qq` varchar( 15 ) not null comment 'qq號碼',
`count` int( 1 ) not null comment '登入限制',
`active` int( 1 ) not null comment '是否啟用',
primary key ( `id` )
) engine = innodb character set gb2312 collate gb2312_chinese_ci;
http://www.bkjia.com/PHPjc/632049.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/632049.htmlTechArticlephp註冊頁面代碼(mysql+php)這是一款利用mysql php執行個體的使用者註冊代碼,比較簡單,就是把html提交過來的資料儲存到mysql資料庫。 php教程註冊...