📄 delete_favorite.php
字号:
<?php
include_once('logincheck.php');
include_once('myconnect.php');
$strinlist_sell="0";
$strinlist_buy="0";
$strinlist_product="0";
$strinlist_profile="0";
foreach($_POST as $key => $value)
{
if(stristr($key,"sell"))
$strinlist_sell.=",".$value;
elseif(stristr($key,"buy"))
$strinlist_buy.=",".$value;
elseif(stristr($key,"product"))
$strinlist_product.=",".$value;
elseif(stristr($key,"profile"))
$strinlist_profile.=",".$value;
}
//echo $strinlist;
//die();
$strquery=" and ( (sb_type='sell' and sb_offer_id in ($strinlist_sell)) or (sb_type='buy' and sb_offer_id in ($strinlist_buy)) or (sb_type='product' and sb_offer_id in ($strinlist_product)) or (sb_type='profile' and sb_offer_id in ($strinlist_profile)) )";
$query_msg_del="delete from sbbleads_favorites where sb_uid=".$_SESSION["sbbleads_userid"]." $strquery";
// die($query_msg_del);
$rs_del=mysql_query($query_msg_del);
$msgdeleted=mysql_affected_rows();
if($msgdeleted > 0)
{
header("Location: other_confirm_mem.php?errmsg=".urlencode("$msgdeleted favorite entry(ies) removed"));
die();
}
else
{
header("Location: other_confirm_mem.php?err=manage_favorites&errmsg=".urlencode("Unable to remove favorites."));
die();
}
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -