<?php
require_once('../../include/class.inc.php');

$id=$_GET["id"];
$name=$_POST["name"];
$phone=$_POST["phone"];
$other=$_POST["other"];
$E_mail=$_POST["E_mail"];
$content=$_POST["content"];
$shenhe=$_POST["shenhe"];

if($name!="" && $phone!="") {
$sql="update message set name='$name',phone='$phone',other='$other',E_mail='$E_mail',content='$content',shenhe='$shenhe' where id='$id'";
//echo $sql;
//exit;
$result=$my->data_work($sql); 
if($result)
{
	echo ("<script type='text/javascript'>alert('修改成功！！');location.href='message.php';</script>");
}
else
{
	echo ("<script type='text/javascript'>alert('修改失败！！');location.href='message_up.php?id=".$id."';</script>");
}
}else{
echo "<script>alert('请填写完整！');location.href='message_up.php?id=".$id."'</script>";	
exit;
}
?>