-
Notifications
You must be signed in to change notification settings - Fork 1
/
editpatient.php
44 lines (42 loc) · 1.36 KB
/
editpatient.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
<title> Edit Patient </title>
<?php
require_once './patient.php';
$patient = getPatient($_GET["id"]);
?>
<form action="doEdit.php" method="POST">
<table>
<tr>
<td> Patient ID </td>
<td><input type="text" readonly="true" value="<?php echo $patient[0]; ?>" name="txtPatientId"/></td>
</tr>
<tr>
<td> Surname</td>
<td><input type="text" value="<?php echo $patient[1]; ?>" name="txtSurname" required="true"/></td>
</tr>
<tr>
<td> Othername </td>
<td><input type="text" value="<?php echo $patient[2]; ?>" name="txtOthername" required="true"/></td>
</tr>
<tr>
<td> Gender </td>
<td>
<select name="cbxGender">
<?php
$arr = array("Male", "Female");
foreach($arr as $e)
{
if ($e == $patient[3])
{
echo "<option selected='true'>$e</option>";
}else {
echo "<option>$e</option>";
}
}
?>
</select>
</td>
</tr>
</table>
<a href="viewpatient.php" style="text-decoration: none; margin-left: 70px"><input type="button" value="Back"/></a>
<input type="submit" value="Update"/>
</form>