-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheditform.php
More file actions
218 lines (205 loc) · 9.97 KB
/
editform.php
File metadata and controls
218 lines (205 loc) · 9.97 KB
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
<?php
require('connectdb.php');
$id = $_GET["id"];
// echo $id;
$sql = "SELECT * FROM students WHERE Id = $id";
$result = mysqli_query($Connect,$sql);
$row = mysqli_fetch_assoc($result);
//print_r($row);
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>ແບບຟຣອມແກ້ໄຂຂໍ້ມູນນັກສຶກສາ</title>
<link rel="stylesheet" href="style_form.css">
<link rel="stylesheet" href="bootstrap/css/bootstrap.min.css">
<script src="bootstrap/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="fontawesome/css/all.css">
<script src="fontawesome/js/all.js"></script>
<style>
*{
margin: 0;
padding: 0;
font-family: 'Times New Roman', Times, serif,'Saysettha OT';
}
body{
height: 100%;
width: 100%;
background-image:url("image/china.jpg");
background-size: cover;
background-position: center;
}
input{
border: none;
margin: 10px 0;
padding: 0 10px;
}
.row input[type="text"],.row input[type="date"],.row input[type="radio"],.row input[type="email"],.row input[type="password"]{
color: #ffff;
background: rgba(000, 000, 000, 0.1);
border: 1px solid rgba(255, 255, 255, 0.2) ;
}
.row input[type="text"]::placeholder,.row input[type="date"]::placeholder,.row input[type="radio"]::placeholder,.row input[type="email"]::placeholder,.row input[type="password"]::placeholder{
color: #ffff;
background: rgba(000, 000, 000, 0.1);
}
.row .form-control{
color: #ffff;
background: rgba(000, 000, 000, 0.1);
border: 1px solid rgba(255, 255, 255, 0.2) ;
}
.row .form-select{
color: #fff;
background: rgba(000, 000, 000, 0.1);
border: 1px solid rgba(255, 255, 255, 0.2) ;
}
.row .form-label{
color:#ffff;
font-size: 18px;
font-weight: 500;
}
h1.text-center{
font-size: 60px;
color: #ffff;
font-weight: 900;
} *{
margin: 0;
padding: 0;
font-family: 'Times New Roman', Times, serif,'Saysettha OT';
}
body{
height: 100%;
width: 100%;
background-image:url("image/china.jpg");
background-size: cover;
background-position: center;
}
input{
border: none;
margin: 10px 0;
padding: 0 10px;
}
.row input[type="text"],.row input[type="date"],.row input[type="radio"],.row input[type="email"],.row input[type="password"]{
color: #ffff;
background: rgba(000, 000, 000, 0.1);
border: 1px solid rgba(255, 255, 255, 0.2) ;
}
.row input[type="text"]::placeholder,.row input[type="date"]::placeholder,.row input[type="radio"]::placeholder,.row input[type="email"]::placeholder,.row input[type="password"]::placeholder{
color: #ffff;
background: rgba(000, 000, 000, 0.1);
}
.row .form-control{
color: #ffff;
background: rgba(000, 000, 000, 0.1);
border: 1px solid rgba(255, 255, 255, 0.2) ;
}
.row .form-select{
color: #fff;
background: rgba(000, 000, 000, 0.1);
border: 1px solid rgba(255, 255, 255, 0.2) ;
}
.row .form-label{
color:#ffff;
font-size: 18px;
font-weight: 500;
}
h1.text-center{
font-size: 60px;
color: #ffff;
font-weight: 900;
}
</style>
</head>
<body>
<div class="container my-4">
<form class="row g-3" action="update.php" method="POST">
<input type="hidden" name="id" value="<?php echo $row["Id"]; ?>">
<h1 class="text-center ">ຟຣອມແກ້ໄຂການລົງທະບຽນ</h1>
<div class="col-md-6 form-group">
<label for="Firstname" class="form-label">ຊື່</label>
<input type="text" name="Firstname" class="form-control" value="<?php echo $row["Firstname"]; ?>">
</div>
<div class="col-md-6 form-group">
<label for="Lastname" class="form-label">ນາມສະກຸນ</label>
<input type="text" name="Lastname" class="form-control" value="<?php echo $row["Lastname"]; ?>">
</div>
<div class="col-md-6 form-group">
<label for="Birthday" class="form-label">ວັນ ເດືອນ ປີເກີດ</label>
<input type="date" name="Birthday" class="form-control" value="<?php echo $row["Birthday"]; ?>">
</div>
<div class="col-md-6 form-group">
<label for="Gender" class="form-label">ເພດ</label>
<div class="form-control">
<?php
if($row["Gender"]=="male"){
echo "<input type='radio' name='Gender' value='male' checked>ຊາຍ";
echo "<input type='radio' name='Gender' value='female'>ຍິງ";
echo "<input type='radio' name='Gender' value='Other'>ອື່ນໆ";
}else if($row["Gender"]=="female"){
echo "<input type='radio' name='Gender' value='male'>ຊາຍ";
echo "<input type='radio' name='Gender' value='female' checked>ຍິງ";
echo "<input type='radio' name='Gender' value='Other'>ອື່ນໆ";
}else{
echo "<input type='radio' name='Gender' value='male'>ຊາຍ";
echo "<input type='radio' name='Gender' value='female'>ຍິງ";
echo "<input type='radio' name='Gender' value='Other' checked>ອື່ນໆ";
}
?>
</div>
</div>
<div class="col-md-6 form-group">
<label for="Age" class="form-label">ອາຍຸ</label>
<input type="text" name="Age" class="form-control" value="<?php echo $row["Age"]; ?>">
</div>
<div class="col-md-6 form-group">
<label for="Career" class="form-label">ອາຊີບ</label>
<input type="text" name="Career" class="form-control" value="<?php echo $row["Career"]; ?>">
</div>
<div class="col-md-6 form-group">
<label for="Village" class="form-label">ບ້ານ</label>
<input type="text" name="Village" class="form-control" value="<?php echo $row["Village"]; ?>">
</div>
<div class="col-md-6 form-group">
<label for="District" class="form-label">ເມືອງ</label>
<input type="text" name="District" class="form-control" value="<?php echo $row["District"]; ?>">
</div>
<div class="col-md-6 form-group">
<label for="Province" class="form-label">ແຂວງ</label>
<input type="text" name="Province" class="form-control" value="<?php echo $row["Province"]; ?>">
</div>
<div class="col-md-6 form-group">
<label for="Phone" class="form-label">ເບີໂທ</label>
<input type="text" name="Phone" class="form-control" value="<?php echo $row["Phone"];?>">
</div>
<div class="col-md-6 form-group">
<label for="Email" class="form-label">ອີເມວ</label>
<input type="email" name="Email" class="form-control" value="<?php echo $row["Email"]; ?>">
</div>
<div class="col-md-6 form-group">
<label for="Password" class="form-label">ລະຫັດຜ່ານ</label>
<input type="password" name="Password" class="form-control" value="<?php echo $row["Password"]; ?>">
</div>
<div class="col form-group">
<label for="Subject" class="form-label">ສາຂາຮຽນ</label>
<select class="form-select" name="Subject">
<option class="text-dark" value="ເຕັກໂນໂລຊີ ຂໍ້ມູນຂ່າວສານ (IT)"<?php if($row["Subject"]=="ເຕັກໂນໂລຊີ ຂໍ້ມູນຂ່າວສານ (IT)"){echo "SELECTED";} ?>>ເຕັກໂນໂລຊີ ຂໍ້ມູນຂ່າວສານ (IT)</option>
<option class="text-dark" value="ວິສະວະກຳໄຟຟ້າ" <?php if($row["Subject"]=="ວິສະວະກຳໄຟຟ້າ"){echo "SELECTED";} ?>>ວິສະວະກຳໄຟຟ້າ</option>
<option class="text-dark" value="ການບໍລິກາານໂຮງແຮມ ແລະ ທ່ອງທ່ຽວ" <?php if($row["Subject"]=="ການບໍລິກາານໂຮງແຮມ ແລະ ທ່ອງທ່ຽວ"){echo "SELECTED";} ?>>ການບໍລິກາານໂຮງແຮມ ແລະ ທ່ອງທ່ຽວ</option>
<option class="text-dark" value="ຄຸ້ມຄອງຫ້ອງການ" <?php if($row["Subject"]=="ຄຸ້ມຄອງຫ້ອງການ"){echo "SELECTED";} ?>>ຄຸ້ມຄອງຫ້ອງການ</option>
<option class="text-dark" value="ພາສາອັງກິດທຸລະກິດ" <?php if($row["Subject"]=="ພາສາອັງກິດທຸລະກິດ"){echo "SELECTED";} ?>>ພາສາອັງກິດທຸລະກິດ</option>
<option class="text-dark" value="ການບັນຊີວິສາຫະກິດ" <?php if($row["Subject"]=="ການບັນຊີວິສາຫະກິດ"){echo "SELECTED";} ?>>ການບັນຊີວິສາຫະກິດ</option>
<option class="text-dark" value="ອາຫາານ-ການໂຮງແຮມ" <?php if($row["Subject"]=="ອາຫາານ-ການໂຮງແຮມ"){echo "SELECTED";} ?>>ອາຫາານ-ການໂຮງແຮມ</option>
</select>
</div>
<div class="text-center">
<a href="index.php" class="btn btn-outline-success me-5">ໜ້າຫຼັກ</a>
<input class="btn btn-primary me-5" type="submit" onclick="return confirm('ທ່ານຕ້ອງການແກ້ໄຂຂໍ້ມູນນີ້ ແມ່ນບໍ່?')" value="ແກ້ໄຂຂໍ້ມູນ">
<a href="showdata.php" class="btn btn-danger " type="reset" onclick="return confirm('ທ່ານບໍ່ຕ້ອງການແກ້ໄຂຂໍ້ມູນນີ້ ແມ່ນບໍ່?')">ຍົກເລີກ</a>
</div>
</form>
</div>
</body>
</html>