📄 adminmodifyok.php
字号:
<?
//初始化session
session_start();
// 包含数据库连接文件
require ('dbconnect.php');
// 必须要用户登录后才能进入修改页面,检测是否登录
if(!isset($_SESSION['Adm'])) {
echo "<p align=center>";
echo "<font color=#FF0000 size=5><strong><big>";
echo "您还没有登录,请<a href='userlogin.php'>登录</a>!";
echo "</big></strong></font></p>";
exit();
}
?>
<?
// 获得参数
$homepage=$_POST['homepage'];
$city=$_POST['city'];
$address=$_POST['address'];
$zip=$_POST['zip'];
$tel=$_POST['tel'];
$edu=$_POST['edu'];
$introduction=$_POST['introduction'];
$interest=$_POST['interest'];
$id=$_POST['id'];
$delpic=$_POST['$delpic'];
// 删除图片
if ($delpic=="Y"){
$sql="update member set homepage='$homepage', city='$city', address='$address', zip='$zip', tel='$tel', edu='$edu', introduction='$introduction', interest='$interest', photo='' where id='$id'";
}
else {
$sql="update member set homepage='$homepage', city='$city', address='$address', zip='$zip', tel='$tel', edu='$edu', introduction='$introduction', interest='$interest' where id='$id'";
}
mysql_query($sql,$conn) or die ("更新数据失败: ".mysql_error());
// 关闭连接
mysql_close($conn);
// 重定向到注册成功页面
header("Location:userinfo.php?id=$id");
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -