【php开源代码栏目提醒】:网学会员--在 php开源代码编辑为广大网友搜集整理了:editvip.php绩等信息,祝愿广大网友取得需要的信息,参考学习。
<?php
/*
* Created on 2006-11-28
*
* To change the template for this generated file go to
* Window - Preferences - PHPeclipse -
PHP - Code Templates
*/
require_once('../com/db.php');
$db = new DataAccess();
$db->connect();
$id = $_POST['eid'];
$sql = "select vip from enterprise where enterprise_id='$id'" ;
$result = $db->query($sql);
$row =
mysql_fetch_array($result);
$db->close();
if(1==$row['vip'])
$
sql = "update enterprise set vip=0 where enterprise_id='$id'";
if(0==$row['vip'])
$sql = "update enterprise set vip=1 where enterprise_id='$id'";
$db1 = new DataAccess();
$db1->connect();
$result = $db1->perform($sql);
if($result)
echo "操作成功 <a href=adminent.php>返回</a>";
else
header("Location: ../com/error.php?err=11");
?>