Please help for fix the problem:
Notice: Undefined variable: id in D:\MyWebSite\css_pro\admin\core\de_products_test.php on line 6
Notice: Undefined variable: id in D:\MyWebSite\css_pro\admin\core\de_products_test.php on line 17
code:
session_start();
require("../../inc/con_db.php");
$qry=mysql_query("SELECT * FROM products WHERE id='$id'");
$row=mysql_fetch_array($qry);
if($row["img_thumb"]!="") {
$thum=$row["img_thumb"];
unlink("/images/products/thumbs/".$thum);
}
if($row["img_larg"]!="") {
$larg=$row["img_larg"];
unlink("/images/products/".$larg);
}
$delete="DELETE FROM products WHERE id='$id' ";
$result=mysql_query($delete);
if($result==1) {
print "Entry delete success";
} else {
print "Entry delete failed";
}
check the $id variable by using