<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
include_once("config.php");
if(!empty($_POST)){
	if(!empty($_POST['id'] ) && !empty($_POST['url'])){
		$url = $_POST['url'];
		$id = $_POST['id'];
		$query = $db->query("SELECT * FROM `convert_aws` WHERE `vid` = '{$id}'");
		$tdata = $db->fetch_assoc($query);
		if(empty($tdata)){
			$id = $db->query("INSERT INTO convert_aws ( `vid`,`v_url`) VALUES ('{$id}','{$url}')");
		}
	}
}
?>