-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpractitioner-view.php
More file actions
39 lines (31 loc) · 1.11 KB
/
Copy pathpractitioner-view.php
File metadata and controls
39 lines (31 loc) · 1.11 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
<?php
// if(isset($_GET["selected_options"])) {
// $selected_options = $_GET['selected_options'];
// }
$host = "localhost";
$username = "root";
$password = "";
$dbname = "patient";
$con =mysqli_connect($host, $username, $password, $dbname, 3307);
if (!$con)
{
die("Connection failed!" . mysqli_connect_error());
}
$sql = "SELECT first_name, last_name, dob, disabilities, description, phone, email FROM patient_table";
$rs = mysqli_query($con, $sql);
if(! $rs ) {
die('Could not get data: ' . mysql_error($con));
}
while($row = mysqli_fetch_assoc($rs)) {
echo "NAME :{$row['first_name']} ".
"{$row['last_name']} <br> ".
"DOB: {$row['dob']} <br>".
"CONTACT: {$row['phone']} <br>".
"EMAIL: {$row['email']} <br> ".
"DISABILITIES : {$row['disabilities']} <br> ".
"DESCRIPTION: {$row['description']} <br> ".
"--------------------------------<br>";
}
// echo "Fetched data successfully\n";
mysqli_close($con);
?>