阅读:1213回复:1
怎么修改admin的登录账号密码
如代码:
//修改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'); } |
|