<?php
$bt="修改签名";
include("../conn.php");
include("../head.php");
include_once("../function.php");
$sid = sqlstr($_COOKIE['dl']);
$uin=mysql_fetch_array(mysql_query("select * from user where sid='$sid'"));
$id=$uin['id'];
if(!$uin){
header("Location:../login.php");
exit;//没登录就跳转到登录页面
}


$txt=sqlstr($_POST["qmtxt"]);
if($txt!=Null){
if(mb_strlen($txt,'utf-8')>50){
echo "<div id='main'>签名不能大于50个字哦，不然不够个性啦~ <br/><a href='/m/user/qm.php'>返回>></a> </div>";
}else{
$row=mysql_query("UPDATE user SET qm='$txt' WHERE id='$id'");
echo "<div id='main'><br/>修改成功　<a href='/m/index.php'>返回>></a></div><br/>";
}
}else{
echo "<br/><br/> <div id='main'> 请输入签名哦</div>　<a href='/m/index.php'>返回>></a></div><br/><br/>";
}

?>
<?php include("../footer.php"); ?>