一聚教程网:一个值得你收藏的教程网站

最新下载

热门教程

php注册页面代码(mysql+php)

时间:2010-08-09 编辑:简简单单 来源:一聚教程网

 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.111com.net','先去论坛逛逛!');
  }else{
   $prompt_msg->p('非常抱歉,系统发生故障!');
  }
 }
?>






css教程" href="css/reg_log.css" />



注册 登录


 
请填写以下必填信息完成注册

   
带红色*的都是必填项目,若填写不全将无法注册

   

     
用户名*

       

       
大小写英文字母、汉字、数字、下划线组成的长度 3-12 个字节以内

   

   

     
密  码*

       

       
最小长度:6 最大长度:16,仅限字母、数字及_,字母区分大小写

   
         
   
 

     

         
           
     

   

   

     
确认密码*

       

       
请再输入一遍您上面填写的密码

   

   

     
email*

       

       
请填写真实并且最常用的邮箱

   

   



 
 



数据库结构

 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;

热门栏目