📄 save_user.php
字号:
<?
/*
* Copyright 2005 Nokia. All rights reserved.
*/
include 'logged_in.php';
include 'database_access.php';
$login = $_POST['user'];
$mobile = $_POST['phone'];
$user_id = $_POST['user_id'];
$role_id = $_POST['group'];
$password = $_POST['pw'];
$query = "update user set login = '".$login."', mobile = '".$mobile."' where id = ".$user_id;
if ($password != '')
{
$query = "update user set login = '".$login."', mobile = '".$mobile."', password = OLD_PASSWORD('".$password."') where id = ".$user_id;
}
mysql_query($query);
if (mysql_error())
{
$_SESSION['info_msg'] = "An error occurred while modifying a user: ".mysql_error();
header('Location: accounts.php');
}
$query = "update userrolemap set roleid = ".$role_id." where userid = ".$user_id;
mysql_query($query);
if (mysql_error())
{
$_SESSION['info_msg'] = "Could not update users group: ".mysql_error();
}
header('Location: accounts.php');
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -