就是想做一个登录系统,但是提交先前注册好的总是输出
是不是where()哪里出问题了,该怎么改啊?
我的数据库中账号为 account_number
看看日志,或者试一试
$condition['usename'] = '江南可采莲';$User->where($condition)->select();
额,账号值不是固定的啊,
where('account_number=$username')
至少应写作
where("account_number=$username")
考虑到 $username 可能不是纯数字
所以应写作
where("account_number='$username'")
或
where(array('account_number' => $username))
PHP怎么学习?PHP怎么入门?PHP在哪学?PHP怎么学才快?不用担心,这里为大家提供了PHP速学教程(入门到精通),有需要的小伙伴保存下载就能学习啦!
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号