我有 unsub.php 代码:
<?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>
而这个表:
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 ;
访问时 unsub.php?id=1&t=1360306174&cid=0
不显示 您的电子邮件已成功从我们的邮件列表中退订。
怎么了 ?访问 unsub.php?id=1&t=1360306174&cid=0 时 unsubstatus 未设置为 1