<?php
require_once('header.php');

$msg_id = intval(@$_POST['msg_id']);

$sql   = "SELECT * FROM {$tablepre}urlerror where msg_id=".$msg_id." limit 0,1";
$myrow = $db->get_row($sql);

if (empty($myrow)){
   $sql="insert into {$tablepre}urlerror (scuser_id,msg_id) values('".$_SESSION["uid"]."','".$msg_id."')";
   $db->exec($sql);
}

$response_arr = array("status" => 1,"msg_id"  => $msg_id);
echo json_encode($response_arr);
exit;
?>