gg_ok.php源代码分析

来源:互联网 发布:海知智能 CTO 编辑:程序博客网 时间:2024/04/27 12:38

 

<?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">

 

原创粉丝点击