【php开源代码栏目提醒】:网学会员为需要php开源代码的朋友们搜集整理了settop.php相关资料,希望对各位网友有所帮助!
<?php
include_once("conn/conn.php");
$sql=mysql_query("select top from tb_bbs where id='".$_GET["id"]."'",$conn);
$info=my
sql_fetch_array($sql);
if($info[top]==1){
mysql_query("update tb_
bbs set top=0 where id='".$_GET["id"]."'",$conn);
}elseif($info[top]==0){
mysql_query("update tb_bbs set top=1 where id='".$_GET["id"]."'",$conn);
}
echo "<script>alert('置上设置成功!');history.back();</script>";
?>