save_hy.php

(完整代码) 1KB

<?
include("inc/conn.php");
include("inc/func.php");
$username=$_POST["userid"];
$password=$_POST["password"];
$name=$_POST["name"];
$tel=$_POST["tel"];
$email=$_POST["email"];
$sex=$_POST["sex"];
$addr=$_POST["addr"];
date_default_timezone_set("PRC");
$time=date("Y-m-d H:i:s");
$act=$_GET["act"];
//添加操作
if($act=='add')
{
  $num=exist_member($username);
     if($num==0)
     {
 $sql="insert into shop_member(userid,password,name,sex,tel,email,post_address,create_date) values('$username','$password','$name','$sex','$tel','$email','$addr','$time')";
 $query=mysql_query($sql);
 echo "<script>alert('注册成功,请登录!'); window.location.href='index.php';</script>";
    }
    else
    {
     echo "<script>alert('该账号已经存在,请重新输入!'); window.location.href='reg.php';</script>"; 
    }
}
//修改操作
if($act=='edit')
{
$id=$_POST["id"];
 $sql="update hy set username='$username',password='$password',name='$name',sex='$sex',tel='$tel',email='$email' where hy_id='$id'";
 $query=mysql_query($sql);
 echo "<script>alert('修改成功!'); window.location.href='my_index.php';</script>";
}
//充值
if($act=='cz')
{
$userid=$_POST["userid"];
$je=$_POST["je"];
 $sql="update shop_member set je=je+'$je' where userid='$userid'";
 $query=mysql_query($sql);
 echo "<script>alert('充值成功!'); window.location.href='cz.php';</script>";
}
//删除操作
if($act=="del")
{
$id=$_GET["id"];
$url=$_SERVER["HTTP_REFERER"];
$sql="delete from student where st_id='$id'";
mysql_query($sql);
echo "<script>alert('已经删除成功!'); window.location.href='".$url."';</script>";
}

?>

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。