-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinvoice.php
48 lines (35 loc) · 1.27 KB
/
invoice.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
<?php include('template-parts/dashbords/header.php');?>
<?php
session_start();
include "connect.php";
if(isset($_SESSION['username']) && isset($_SESSION['user_id']))
{ ?>
<div class="container-fluid">
<div class="row main-section">
<!-- If Admin Logged in -->
<?php if ($_SESSION ['user_type'] == 'admin') {?>
<?php include('users/admin/payment.php'); ?>
<?php } elseif ($_SESSION ['user_type'] == 'patient') {?>
<?php
$user_id = $_SESSION['user_id'];
$query = "SELECT * FROM patients WHERE user_id = '$user_id'";
$resul = mysqli_query($conn, $query);
$row = mysqli_fetch_assoc($resul);
$patient_id = $row['patient_id'];
$patient_fname = $row['first_name'];
$patient_lname = $row['last_name'];
$patient_bday = $row['date_of_birth'];
$patient_add = $row['address'];
$patient_phone = $row['phone_number'];
$patient_email = $row['email'];
$patient_medical_h = $row['medical_history'];
?>
<?php include('users/paitent/payment.php'); ?>
<?php }?>
</div>
</div>
</div>
<?php } else {
header("Location: index.php");
}?>
<?php include('template-parts/dashbords/footer.php'); ?>