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

检测用户名是否存在 Monxin专用(PHP代码函数)

2015-04-09 10:55 513 查看
//检测用户名是否存在 Monxin专用(PHP代码函数)
//本代码基于Monxin 运行
//代码来源:Monxin ./config/functions.php

function check_username($pdo,$username){
$sql="select count(id) as c from ".$pdo->index_pre."user where `username`='$username'";
$r=$pdo->query($sql)->fetch(2);
if($r['c']==1){return true;}else{return false;}
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: