<?php
header("Content-Type:text/html;charset=UTF-8");
include('ini.php');

foreach ($_POST as $key=>$value){
$one[]=$key;
$two[]="'".$value."'";
}

$zd = implode(',',$one);
$z = implode(',',$two);

mysql_query("set names utf8");
$sql="INSERT INTO main (".$zd.") VALUES (".$z.")";

if (!mysql_query($sql,$con)){
  die('Error: ' . mysql_error());
  }

echo "<script>alert('任务已提交!');</script>";
echo "<script>history.go(-1);</script>";
?>