-
Notifications
You must be signed in to change notification settings - Fork 1
/
patient_index.php
98 lines (91 loc) · 3.44 KB
/
patient_index.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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<!DOCTYPE html>
<?php
include('session_patient.php'); ?>
<html>
<head>
<title>Healthcare</title>
<link rel="stylesheet" type="text/css" href="./css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
</head>
<body>
<nav class="navbar navbar-default">
<div class="container-fluid">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">Welcome <?php echo $_SESSION["user_name"] ?></a>
</div>
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li class="dropdown">
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">View Details<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="view_test_results.php">Test results</a></li>
<li role="separator" class="divider"></li>
<li><a href="view_prescriptions.php">Prescriptions</a></li>
</ul>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"style="padding-left:750px">Settings<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="logout.php">Log Out</a></li>
</ul>
</li>
</ul>
</div><!-- /.navbar-collapse -->
</div><!-- /.container-fluid -->
</nav><!--
<a href="./doctor_reg.html">Sign up</a>
<a href="./doctor_login.html">Log in</a>
<a href="./patient_reg.html">Sign up</a>
<a href="./patient_login.html">Log in</a> -->
<?php
include("config.php");
$id = $_SESSION['user_id'];
$a = mysqli_query($conn,"SELECT * from patient where p_id = '$id'");
if(!$a || mysqli_num_rows($a) == 0){
echo "NOT FOUND";
}else{
$row = mysqli_fetch_array($a,MYSQLI_ASSOC);
?>
<div class="container">
<table class="table table-striped">
<tbody>
<tr>
<td>ID</td>
<td><?php echo $row['p_id']; ?></td>
</tr>
<tr>
<td>Name</td>
<td><?php echo $row['p_name']; ?></td>
</tr><tr>
<td>Email</td>
<td><?php echo $row['p_email']; ?></td>
</tr><tr>
<td>Phone</td>
<td><?php echo $row['p_phone']; ?></td>
</tr><tr>
<td>Height</td>
<td><?php echo $row['p_height']; ?></td>
</tr><tr>
<td>Weight</td>
<td><?php echo $row['p_weight']; ?></td>
</tr>
</tbody>
</table>
</div>
<?php } ?>
</body>
</html>