-
Notifications
You must be signed in to change notification settings - Fork 0
/
useredit.php
56 lines (44 loc) · 1.33 KB
/
useredit.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?php
header("Cache-Control: no-cache, post-check=0, pre-check=0");
header("Content-type:text/html;charset=gb2312");
session_start(); //定义SESSION变量
$con = mysql_connect("localhost","root","");
mysql_select_db("qingzhou", $con);
mysql_query("set names gb2312 ");
if ($_POST[password]!='')
{
$sql1 = "UPDATE php_admin SET password = '$_POST[password]' WHERE userid = '".$_SESSION['userid']."'";
$RS0 = mysql_query($sql1, $con);
//echo $sql1;die();
}
if($_POST[username]!='')
{
$sql1 = "UPDATE php_admin SET username = '$_POST[username]' WHERE userid = '".$_SESSION['userid']."'";
$RS0 = mysql_query($sql1, $con);
//echo $sql1;die();
}
if($_POST[usermobile]!='')
{
$sql1 = "UPDATE php_admin SET usermobile = '$_POST[usermobile]' WHERE userid = '".$_SESSION['userid']."'";
$RS0 = mysql_query($sql1, $con);
//echo $sql1;die();
}
if($_POST[useremail]!='')
{
$sql1 = "UPDATE php_admin SET useremail = '$_POST[useremail]' WHERE userid = '".$_SESSION['userid']."'";
//echo $sql1;die();
$RS0 = mysql_query($sql1, $con);
}
header("location: selectproduct0.php"); //重新定位网页
//mysql_query("UPDATE php_admin SET password = '$_POST[password]' WHERE userid = '$_SESSION['userid']'");
?>
<html>
<body>
<?php
//retrieve session data
mysql_close($con);
$RS=NULL;
$con =NULL;
?>
</body>
</html>