سلام. توی یک صفحه وقتی روی یک لینک کلیک میکنم (مثلا لینک حذف) آی دی اون رو به یک صفحه ارسال کردم تا توی اون صفحه دستور حذف رو اجرا کنم ولی ارور میده:
Notice: Undefined index: cat_id in C:\xampp\htdocs\mycms\cpanel\delete.php on line 3
صفحه index.php
<a href="delete.php?id='.$res[$i]['cat_id'].'"></a>
صفحه delete.php
<?php
include 'inc/categories.class.php';
$id = $_REQUEST['cat_id'];
$cat = new categories();
$res = $cat->delete_product_categories($cat_id);
if ($res == false)
{
echo "0";
}
else
{
echo "1";
}
?>
اینم کلاس مربوطه: categories.class.php
public function delete_product_categories($cat_id){
$query = "delete from categories where cat_id = $cat_id";
$do = mysql_query($query);
return $do;}