请帮助解决问题:
注意:未定义变量:第 6 行 D:\MyWebSite\css_pro\admin\core\de_products_test.php 中的 id
注意:未定义变量:第 17 行 D:\MyWebSite\css_pro\admin\core\de_products_test.php 中的 id
代码:
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";
}