时间:2021-07-01 10:21:17 帮助过:35人阅读
session_start();这个 哪里出了错误。
header("Content-type:text/html; charset=utf-8");
include '../config.php';
if($_SESSION['admin']=='') header('location:index.php');
$show = "display:none;";
$sql = "SELECT * FROM `cp_admin` WHERE `id`='1'";
$ret = mysql_query($sql);
$row = mysql_fetch_assoc($ret);
if($_POST){
$admin = $_POST['admin'];
$pass = $_POST['pass'];
$pass1 = $_POST['pass1'];
$pass2 = $_POST['pass2'];
if($row['name']!=$admin && $row['pwd']!=md5($pass) && $pass1!=$pass2){
echo "";
}else{
$pass1=md5($pass1);
$sql1 = "UPDATE `cp_admin` SET `name`='{$admin}',`pwd`='$pwd2).', WHERE `id`='1'";
mysql_query($sql1);
echo "";
echo "";
$show = "display:block;";
}
}
?>