当前位置:Gxlcms > PHP教程 > php注册页面代码(mysql+php)_PHP教程

php注册页面代码(mysql+php)_PHP教程

时间:2021-07-01 10:21:17 帮助过:2人阅读

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;

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/632049.htmlTechArticlephp注册页面代码(mysql+php)这是一款利用mysql php实例的用户注册代码,比较简单,就是把html提交过来的数据保存到mysql数据库。 php教程注册...

人气教程排行