-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdbcon.php
More file actions
35 lines (28 loc) · 815 Bytes
/
Copy pathdbcon.php
File metadata and controls
35 lines (28 loc) · 815 Bytes
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
<?php
/*
* Copyright © 2026 COPD GUARD - Health Management System (Dashboard)
* All rights reserved.
* Developed by Abdulrahman Fadhl Ameer Saif
* @EngAboodSDev (abdulrahmanfadhl@gmail.com)
*/
function connectDB()
{
$servername = "localhost";
$username = "root";
$password = "";
// Create connection
$db = mysqli_connect($servername, $username, $password);
// Check connection
if (!$db) {
die("Connection failed: " . mysqli_connect_error());
}
if (!mysqli_select_db($db, 'copd_guard'))
die("Unable to select database: " . mysqli_error($db));
return $db;
}
/*
* Copyright © 2026 COPD GUARD - Health Management System (Dashboard)
* All rights reserved.
* Developed by Abdulrahman Fadhl Ameer Saif
* @EngAboodSDev (abdulrahmanfadhl@gmail.com)
*/