Verify whether the user has registered in thinkphp
Merovingian
Merovingian 2018-08-08 16:55:46
0
1
1059

How does thinkphp determine whether the username already exists in the database

Merovingian
Merovingian

reply all(1)
新鲜的中华鸡腿

$db_username = Db::name('用户表')->where('username','=','用户名')->find();

if($db_username != 0){

    echo 'Username already exists';

}

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template