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

$VoteID=$_GET["VoteID"];
$VoteName=$_POST["VoteName"];
$class=$_POST["class"];
			
if($VoteName!="" && $class!="") {
$sql="update voteclass set VoteName='$VoteName',class='$class' where VoteID='$VoteID'";
//echo $sql;
//exit;
$result=$my->data_work($sql); 
if($result)
{
	echo ("<script type='text/javascript'>alert('修改成功！！');location.href='vote_class.php';</script>");
}
else
{
	echo ("<script type='text/javascript'>alert('修改失败！！');location.href='vote_class_up.php';</script>");
}
}else{
 echo "<script language=javascript>alert('不能为空!');history.go(-1)</script>";
exit;
}
?>