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

$voteid=intval($_POST["VoteID"]);
$Votetitle=htmlspecialchars($_POST["Votetitle"]);
if($voteid!="" && $Votetitle!="") {
$sql="insert into vote(voteid,Votetitle) values($voteid,'$Votetitle')";

$result=$my->data_work($sql); 
}
if($result)
{
echo ("<script type='text/javascript'>alert('添加成功！！');location.href='vote.php';</script>");
}
else 
{
echo ("<script type='text/javascript'>alert('添加失败，请检查您所填写的内容是否完整。');location.href='vote_add.php';</script>");
}
?>