<?php 
require ("link.php");

$web_pwd=md5($_POST["check_pwd"]);


if ($web_pwd=="")
	{
		echo "{\"success\":false,\"msg\":\"输入有空，提交失败\"}";	
	}

else
{
	mysql_connect($se_name,$sedb_name,$db_pass) or die("无法连接数据库，请重来");
	mysql_select_db($db_name) or die("无法选择数据库，请重来");
	$sql = "update l_user set user_pw='$web_pwd' where mg_id='1' ";
    $result=mysql_query($sql);
	if(mysql_affected_rows())
		{
			echo "{\"success\":true,\"msg\":\"修改成功!\"}";	
		}else{
			echo "{\"success\":false,\"msg\":\"修改失败!\"}";	
		}
}


?>


