<?php
require_once("../../config.php");
require_once("../check.php");
isset($_POST['content'])?$content = $_POST['content']:$content = null;
isset($_POST['title'])?$title = $_POST['title']:$title = null;
ini_set("date.timezone","PRC");
$datetime = time();
$content = strip_tags($content);
$content = str_replace("\n","<br/>",$content);
$arsql = "insert into dunling_article (title,content,datetime) values ('$title','$content','$datetime')";
$arery = mysql_query($arsql,$config)or die(mysql_error());
mysql_close();
if($arery){
    echo "ok";
    exit;
}else{
    echo 'Error';
}
?>