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

use this query, you missed backticks `

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

I think you have the error here:

if($mysql->total(email_advt","id=$id AND time=$time")>0)

try

if($mysql->total("email_advt"," id=$id AND time=$time")>0)

though I'm not really sure what you are trying to get or the arguments of the total() method.

If you are using a built-in function as a column name you need to enclosed it in a grave accent. i.e in your query you are using a column time which is a built-in function in MySQL.