-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpayment.php
83 lines (55 loc) · 2.17 KB
/
payment.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
72
73
74
75
76
77
78
79
80
81
<?php
if(!isset($_SESSION))
{
session_start();
}
?>
<link href="bootstrap.min.css" rel="stylesheet">
<?php
include("header.php");
include("library.php");
noAccessForNormal();
noAccessForAdmin();
noAccessForDoctor();
include('nav-bar.php');
?>
<div class="container">
<h2>Update Payment Information</h2>
<p>Enter information below</p>
<table class="table table-striped">
<?php
if(isset($_POST['payment'])){
$i = update_appointment_info($_POST['appointment_no'], 'payment_amount', $_POST['payment']);
if($i==1){
echo "<script type='text/javascript'>window.location = 'all_appointments.php'</script>";
}
}
if(isset($_GET['appointment_no'])){
$appointment_no = $_GET['appointment_no'];
$result = getAllPatientDetail($appointment_no);
$row = $result->fetch_array();
$link = "<tr><th>";
$mid = "</th><td>";
$endingTag = "</td></tr>";
echo "<tr>"; // appointment_no, full_name, dob, weight, phone_no, address, blood_group, medical_condition
echo "$link Appointment No $mid". $row['appointment_no'] . "$endingTag";
echo "$link Full Name $mid" . $row['full_name'] . "$endingTag";
echo "$link Age (in years) $mid" . $row['dob'] . "$endingTag";
echo "$link Weight $mid" . $row['weight'] . "$endingTag";
echo "$link Phone No $mid" . $row['phone_no'] . "$endingTag";
echo "$link Address $mid" . $row['address'] . "$endingTag";
echo "$link Medical Condition $mid" . $row['medical_condition'] . "$endingTag";
echo "$link Payment $mid" . "<form action='payment.php' method='post'>
<select required value=1 class ='form-control' name='payment' style='width: 500;'>
<option value='admin' class='option'>200</option>
<option value='clerks' class='option'>500</option>
<option value='doctors' class='option'>900</option>
</select>
<input type='number' style='visibility: hidden; width; 1px;' name=\"appointment_no\" value =" . $appointment_no . ">
<input type='submit' class='btn btn-primary' action='payment.php'></form>" . "$endingTag";
echo "</tr>";
}
?>
</table>
</div>
<?php include("footer.php"); ?>