-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathedit.php
39 lines (35 loc) · 898 Bytes
/
edit.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
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=gbk">
<title>编辑成绩</title>
</head>
<?php
header("Content-type: text/html; charset=gbk");
require 'config.php';
$id = $_GET['id'];
if(empty($id)){
exit("id错误!");
}
$sql="select * from score where id=$id";
$result = $db->query($sql);
$row=$result->fetch_array(1)
?>
<body>
<form action="update.php" method="post" name="form1">
<table>
<tr>
<td>姓名:<input type="text" name="name" value="<?php echo $row['name']?>"/>
<input type="hidden" name="id" value="<?php echo $id?>" /></td>
</tr>
<tr>
<td>学号:<input type="text" name="stu_num" value="<?php echo $row['stu_num']?>"/></td>
</tr>
<tr>
<td>成绩:<input type="text" name="grade" value="<?php echo $row['grade']?>"/></td>
</tr>
<tr><td><input type="submit" value="修改" /></td></tr>
</table>
</form>
</body>
</html>