您的位置:首页 > 编程语言 > PHP开发

使用thinkphp框架实现登录注册功能

2016-04-20 13:50 1036 查看
1、创建数据库

/*
Navicat MySQL Data Transfer

Source Server : 本地连接
Source Server Version : 50617
Source Host : localhost:3306
Source Database : crm

Target Server Type : MYSQL
Target Server Version : 50617
File Encoding : 65001

Date: 2015-06-29 23:55:28
*/

SET FOREIGN_KEY_CHECKS=0;

-- ----------------------------
-- Table structure for think_users
-- ----------------------------
DROP TABLE IF EXISTS `think_users`;
CREATE TABLE `think_users` (
`userid` mediumint(8) unsigned NOT NULL AUTO_INCREMENT COMMENT '用户id',
`companyid` mediumint(8) unsigned NOT NULL COMMENT '公司id',
`pid` mediumint(8) NOT NULL COMMENT '父id',
`username` char(20) NOT NULL DEFAULT '' COMMENT '用户名',
`password` char(32) NOT NULL DEFAULT '' COMMENT '密码',
`nickname` char(20) NOT NULL DEFAULT '' COMMENT '昵称',
`regdate` int(10) unsigned NOT NULL COMMENT '注册时间',
`lastdate` int(10) unsigned NOT NULL COMMENT '最后一次登录时间',
`regip` char(15) NOT NULL DEFAULT '' COMMENT '注册ip',
`lastip` char(15) NOT NULL DEFAULT '' COMMENT '最后一次登录ip',
`loginnum` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT '登录次数',
`email` char(32) NOT NULL DEFAULT '' COMMENT '邮箱',
`mobile` char(11) NOT NULL DEFAULT '' COMMENT '手机号码',
`islock` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否锁定',
`vip` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否会员',
`overduedate` int(10) unsigned NOT NULL COMMENT '账户过期时间',
`status` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '状态-用于软删除',
PRIMARY KEY (`userid`),
UNIQUE KEY `username` (`username`) USING BTREE,
KEY `email` (`email`) USING BTREE
) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: