阅读:78回复:1

怎么修改admin的登录账号密码

楼主#
更多 发布于:2021-11-08 15:41
如代码:

//修改admin为你的登录参数。登录地址为 http://xx.com/admin/cms_login.php?admin
 */
if(isset($_POST['submit'])){
    if ($_SESSION['verifycode'] != $_POST['verifycode']) {
 alert_href('验证码错误','cms_login.php');
 }
 null_back($_POST['a_name'],'请输入用户名');
 null_back($_POST['a_password'],'请输入密码');
    null_back($_POST['verifycode'],'请输入验证码');
 $a_name = $_POST['a_name'];
 $a_password = $_POST['a_password'];
 $sql = 'select * from mkcms_manager where m_name = "'.$a_name.'" and m_password = "'.md5($a_password).'"';
 $result = mysqli_query($conn,$sql);
 if(!! $row = mysqli_fetch_array($result)){
 setcookie('admin_name',$row['m_name']);
        setcookie('admin_password',$row['m_password']);
 header('location:cms_welcome.php');
 }else{
 alert_href('用户名或密码错误','cms_login.php');
 }
1楼#
发布于:2021-11-08 18:49
你这个厉害了。。。我一般都直接去数据库替换,也不是经常改密码。用不到!
游客

返回顶部