<?php
$title=$_POST['titlename'];
$source=$_POST['sourcename'];
$author=$_POST['authorname'];
$date=$_POST['datename'];
$content=$_POST['textarea'];
require("DB_connect.php");
mysql_select_db("sysp", $con);
mysql_query("set names gb2312");
$sql="INSERT INTO `sysp`.`zzjg` (
`zid` ,`ztitle` ,`zcontent` ,`zdate` ,`source` ,`author` ,
`lerder` ,`dleader` ,`members` ,`leadership` ,`respon` )VALUES (
NULL , '$title', '$content', '$date', '$source', '$author', NULL , NULL , NULL , NULL , NULL );)";
$result=mysql_query("$sql");
if(!$result){
echo "<script language='javascript'>";
echo "alert('$title'); location='addzzjg.php';";
echo "</script>";
}
else{
echo"$title";
echo "<script language='javascript'>";
echo "alert('123'); location='error.php';";
echo "</script>";
}
?>