include ("config.php");
$con = mysql_connect($host,$user,$pw) or die(mysql_error());
mysql_select_db($db) or die(mysql_error());
mysql_query("SET CHARACTER SET utf8");
{
$json = $_POST["MyJSON"];
$jsall = array();
$jsone = array();
$jsall=json_decode($json, true);
$x = 0;
while($x < count($jsall)) {
$jsone=$jsall[$x];
$id=$jsone["ID"];
$title=$jsone["Title"];
$url=$jsone["Url"];
//$url = filter_var($jsone["Url"], FILTER_SANITIZE_URL);
//$nurl=htmlspecialchars($url);
echo $url;
//$q = mysql_query("INSERT INTO test_tbl(table_id, title, url) VALUES($id, '$title', '$nurl')");
$x++;
}
print json_encode("Inserted Data");
}
?>