doubanduo7620 2013-02-08 09:52
浏览 7

too long

I have unsub.php code:

<?php 
include("config.inc.php");
$id=$_REQUEST['id'];
$time=$_REQUEST['t'];
$cid=0;
if(isset($_REQUEST['cid']))
$cid=$_REQUEST['cid']

if($cid==0)
mysql_query("update email_advt set unsubstatus=1 where id=$id AND time=$time");
else
{
if($mysql->total(email_advt","id=$id AND time=$time")>0)
mysql_query("delete from ea_em_n_cat where eid=$id AND cid=$cid");
}

?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html>
<head>
<title> Unsubscribe Email</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
Your email has been successfully unsubscribed from our mailing list. <br>
</body>
</html>

And this tables:

CREATE TABLE IF NOT EXISTS `email_advt` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `email` varchar(250) NOT NULL DEFAULT '',
  `unsubstatus` int(11) NOT NULL DEFAULT '0',
  `time` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `email` (`email`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=4 ;

CREATE TABLE IF NOT EXISTS `ea_em_n_cat` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `eid` int(11) NOT NULL DEFAULT '0',
  `cid` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=7 ;

When access unsub.php?id=1&t=1360306174&cid=0
Not show Your email has been successfully unsubscribed from our mailing list.
What is wrong ? unsubstatus not set to 1 when acces unsub.php?id=1&t=1360306174&cid=0

  • 写回答

3条回答 默认 最新

  • dongrang2140 2013-02-08 09:55
    关注

    use this query, you missed backticks `

    mysql_query("update email_advt set `unsubstatus`=1 where `id`=$id AND `time`=$time");
    
    评论

报告相同问题?

悬赏问题

  • ¥20 求各位懂行的人,注册表能不能看到usb使用得具体信息,干了什么,传输了什么数据
  • ¥15 个人网站被恶意大量访问,怎么办
  • ¥15 Vue3 大型图片数据拖动排序
  • ¥15 Centos / PETGEM
  • ¥15 划分vlan后不通了
  • ¥15 GDI处理通道视频时总是带有白色锯齿
  • ¥20 用雷电模拟器安装百达屋apk一直闪退
  • ¥15 算能科技20240506咨询(拒绝大模型回答)
  • ¥15 自适应 AR 模型 参数估计Matlab程序
  • ¥100 角动量包络面如何用MATLAB绘制