<?php
include("../conn/conn.php");
%导入数据库连接文件
$id=$_GET[id];
%获得广告的id
$flag=$_GET[flag];
%获取“是否推荐”的值
$sql=mysql_query("update tb_advertising set flag=1 where id=$id");
%更新字符串
if($sql){
echo "<script>alert('该信息已被推荐!');window.location.href='find_gg.php?flag=$flag';</script>";
%若更新成功,则提示“该信息已被推荐”
}
else{
echo "<script>alert('该信息推荐操作失败!');history.back();</script>";
%否则,提示“该信息推荐操作失败”
}
?>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">