-
Notifications
You must be signed in to change notification settings - Fork 0
/
user.php
63 lines (61 loc) · 1.96 KB
/
user.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
57
58
59
60
61
62
63
<?php require_once('mysql.func.php')?>
<!DOCTYPE html>
<html><head>
<meta charset="UTF-8">
<title>IBM大型主机科普网站 | 公众</title>
</head>
<body>
<?php
$uid=$_SESSION['userid'];
$row=select($uid);
?>
<div class="m-form">
<form name="userForm" id="userForm" action="updateuser.php" method="post">
<fieldset>
<input type="hidden" value="<?php echo $uid ;?>" name="uid"id="uid">
<div class="formitm">
<label class="lab">用户名:</label>
<div class="ipt">
<?php echo $row['username'];?>
</div>
</div>
<div class="formitm">
<label class="lab">邮箱:</label>
<div class="ipt">
<input type="text" class="u-ipt" name="email" id="email" value="<?php echo $row['email']; ?>"/>
</div>
</div>
<div class="formitm">
<label class="lab">密码:</label>
<div class="ipt">
<input type="text" class="u-ipt" name="pwd" id="pwd" value="<?php echo $row['password']?>"/><br/>
</div>
</div>
<div class="formitm">
<div class="ipt">
<label class="lab">性别:</label>
<?php
$sex1=$row['sex'];
if($sex1=="male"){
$sex_t1="男";
$sex_t2="女";
$sex2="female";
}else{
$sex_t1="女";
$sex_t2="男";
$sex2="male";
}
?>
<select name="sex"> <option value="<?php echo $sex1;?>"><?php echo $sex_t1;?></option><option value="<?php echo $sex2;?>"><?php echo $sex_t2;?></option>
</select>
</div>
</div>
<br/>
<div>
<input type="submit" value="保存" />
</div>
</fieldset>
</form>
</div>
</body>
</html>