<?
$id=$_POST["id2"];

$user="cp037684_tbadm";
$password="siamnovaTho1220!";
$database="cp037684_tbadm";
$c = mysql_connect("localhost",$user,$password);

mysql_query("SET character_set_results=tis620");
mysql_query("SET character_set_client=''tis620''");
mysql_query("SET character_set_connection=''tis620''");
mysql_query("collation_connection = tis620_thai_ci");
mysql_query("collation_database = tis620_thai_ci");
mysql_query("collation_server = tis620_thai_ci");
 
@mysql_select_db($database) or die( "Unable to select database");
mysql_db_query($database,"SET NAMES tis620");// 

$q="DELETE FROM `product` WHERE  `id` = '$id' ";
if (!$RES = mysql_query($q, $c)) die("มีปัญหากับ : ". $q);
$q="DELETE FROM `file` WHERE  `id` = '$id' ";
if (!$RES = mysql_query($q, $c)) die("มีปัญหากับ : ". $q);
$q="DELETE FROM `filedata` WHERE  `masterid` = '$id' ";
if (!$RES = mysql_query($q, $c)) die("มีปัญหากับ : ". $q);

mysql_close(); 
echo $id;
?>
