del_ok.php源代码分析

<script>function StorePage(){d=document;t=d.selection?(d.selection.type!='None'?d.selection.createRange().text:''):(d.getSelection?d.getSelection():'');void(keyit=window.open('http://www.365key.com/storeit.aspx?t='+escape(d.title)+'&u='+escape(d.location.href)+'&c='+escape(t),'keyit','scrollbars=no,width=475,height=575,left=75,top=20,status=no,resizable=yes'));keyit.focus();}</script>

<?php

include("../conn/conn.php");

$id=$_GET[id];

%获取id

$flag=$_GET[flag];

%获取flag

$sql=mysql_query("delete from tb_advertising where id=$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">

你可能感兴趣的:(sql,C++,c,PHP,mysql)