时间:2021-07-01 10:21:17 帮助过:9人阅读
$value){ if (!isset($key) || ($value=='')){ return false; } return true; } } //验证邮箱是否有效 function verifyemail($email){ if (@ereg('^[a-zA-Z0-9_\.\-]+@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]+$', $email)){ return true; }else { return false; } } //检查用户名是否已经存在 //$connectmysql为数据库连接对象 function verifyname($username,$connectmysql){ $sql="select * from db_reglog where username='$username'"; $res=$connectmysql->getRowsNum($sql); if ($res !=''){ return true; }else { return false; } } //将注册信息写入数据库 //$connectmysql为数据库连接对象 function register($name,$passd,$email,$connectmysql){ $sql="insert into db_reglog values('$name',sha1('$passd'),'$email','')"; $res=$connectmysql->uidresult($sql); if ($res != ''){ return true; }else { return false; } }
目录结构
论坛首页
内容页
下载地址:http://pan.baidu.com/share/link?shareid=3104998419&uk=1094580398
http://www.bkjia.com/PHPjc/755762.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/755762.htmlTechArticle注册相关函数 $value){if (!isset($key) || ($value=='')){return false;}return true;}}//验证邮箱是否有效function verifyemail($email){if (@ereg('^[a-zA-Z0-9_\.\-]+@([a-zA...