forked from eawariyah/Group_work
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathviewing.php
More file actions
120 lines (100 loc) · 3.89 KB
/
Copy pathviewing.php
File metadata and controls
120 lines (100 loc) · 3.89 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
<?php
//API
//list to the request and collect your data
if (isset($_GET['uid']))
{
$getuser_id = $_GET['uid'];
//database connection
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "clinic_db";
//check if connection work
/// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error)
{
die("Connection failed: " . $conn->connect_error);
}
//write the query
$sql = "SELECT * FROM patient WHERE Patient_Id=$getuser_id";
//execute the query (SELECT)
$result = $conn->query($sql);
//verify if query worked
if ($result)
{ while($row = $result->fetch_assoc()){?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Patient Details</title>
<link href="patient.css" rel="stylesheet" type="text/css" />
<link href="personsList.css" rel="stylesheet" type="text/css" />
<link href="doctorsNursesHome.css" rel="stylesheet" type="text/css" />
</head>
<body>
<main>
<div class='navBar'>
<div class="image_placeholder">
<img src=""><img>
</div>
<div class="name_placeholder">
<b id="Fname">Fname lname</b>
</div>
<b id="emailVal">Fname.lname@abc.com</b>
<a class='button' id = "doctorsHomepg" href='doctorsHome.php'>Home</a>
<a class='button' id="calendarpg" href='calendar.php'>Calendar</a>
<a class='button' id="patientsListpg" href='patientsList.php'>Patients</a>
<a class='button' id="nursesListpg" href='nursesList.php'>Nurses</a>
<a class='button' id="createTaskpg" href='createTask.php'>Create Task</a>
<a class='button' href='logout.php' id='signOut'>SignOut</a>
</div>
<div class='navBar2'>
<button onclick="myFunction()" class="dropbtn">Menu</button>
<div id="myDropdown" class="dropdown-content">
<a href='doctorsHome.php'>Home</a>
<a href='calendar.php'>Calendar</a>
<a href='patientsList.php'>Patients</a>
<a href='nursesList.php'>Nurses</a>
<a href='createTask.php'>Create Task</a>
</div>
</div>
<div class='patientData'>
<div class='bioData'>
<div class='imageContainer'><img src='assets/patientImage.jpg'></div>
<h2 class='name' id='name' name='name'> <?php echo $row['Firstname']," ", $row['Lastname']; ?></h2>
<p class='DOB' id='DOB' name='DOB'>Date of Birth: <?php echo $row['DOB']; ?></p>
<p class='sex' id='sex' name='sex'>Gender: <?php echo $row['Gender']; ?></p>
<p class='Height' id='height' name='height'>Height: <?php echo $row['Height']; ?></p>
<p class='weight' id='weight' name='weight'>Weight: <?php echo $row['Patient_weight']; ?></p>
<p class='Ethnicity' id='ethnicity' name='ethnicity'>Ethnicity: <?php echo $row['Ethnicity']; ?></p>
<p class='Blood Group' id='Blood Group' name='bloodGroup'>Blood Group: <?php echo $row['BloodGroup']; ?></p>
<p class='email' id='email' name='email'>Email : <?php echo $row['Email']; ?></p>
<p class='Phone_numb' id='number' name='phone_number'>Phone Number : <?php echo $row['PhoneNumber']; ?></p>
<p class='medical history' id='MH' name='history'>Medical History : <?php echo $row['MedicalHistory']; ?></p>
</div>
<div class='medicalHistory'>
<ul class='diseases'><b>Medical History</b></br></br>
<li><?php echo $row['MedicalHistory'];?></li>
<li>Malaria</li>
</ul>
</div>
</div>
</main>
</body>
</html>
<?php
}
}
else
{
echo 'Delete failed';
}
}
else
{
echo '<h1>You got here the wrong way</h1>';
}
?>