-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathstudentEdit.php
71 lines (71 loc) · 2.7 KB
/
studentEdit.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
64
65
66
67
68
69
70
71
<?php
require 'inc/dbh.php';
$sql = "SELECT * FROM students WHERE id = :id";
$stm = $dbh->prepare($sql) or die('SQL err');
$stm->execute($_GET);
$student = $stm->fetch(PDO::FETCH_ASSOC );
?><!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<link rel="stylesheet" href="node_modules/bootstrap/dist/css/bootstrap.rtl.min.css">
</head>
<body dir="rtl">
<div class="container">
<form action="studentUpdate.php" method="post">
<input type="hidden" name="id" value="<?php echo $student['id']; ?>">
<div class="row">
<div class="col-md">
<div class="form-group">
<label for="name">
Name
</label>
<input type="text" id="name" name="name" value="<?php echo $student['name']; ?>" placeholder="Name" class="form-control">
</div>
</div>
<div class="col-md">
<div class="form-group">
<label for="username">
Username
</label>
<input type="text" id="username" name="usernamex" value="<?php echo $student['username']; ?>" placeholder="Username" class="form-control">
</div>
</div>
</div>
<div class="row">
<div class="col-md">
<div class="form-group">
<label for="tel">
Mobile
</label>
<input type="tel" id="tel" name="tel" value="<?php echo $student['tel']; ?>" placeholder="Mobile" class="form-control">
</div>
</div>
<div class="col-md">
<div class="form-group">
<label for="email">
Email
</label>
<input type="email" id="email" name="email" value="<?php echo $student['email']; ?>" placeholder="Email" class="form-control">
</div>
</div>
</div>
<div class="form-group">
<label for="addr">
Address
</label>
<textarea name="address" id="addr" class="form-control" rows="3"><?php echo $student['address']; ?></textarea>
</div>
<div class="mt-2">
<button class="btn btn-primary">
Save
</button>
</div>
</form>
</div>
</body>
</html>