-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathutils.php
More file actions
28 lines (28 loc) · 753 Bytes
/
utils.php
File metadata and controls
28 lines (28 loc) · 753 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
<?php
function checkStatus($data_capture){
if(isset($_SESSION['username'])) {
$usernames=$_SESSION['username'];
}
// echo $username;
include 'api/db_connect.php';
$status=true;
// Check the connection
// Fetch user records from the database
$sql = "SELECT * FROM logs where data_capture='$data_capture' and username='$usernames'";
//echo $sql;
$result = $connect->query($sql);
if ($result->num_rows > 0) {
// Loop through the result set
while ($row = $result->fetch_assoc()) {
$status=true;
}
} else {
$status=false;
}
if($status){
echo '<span class="badge">Done</span>';
}
// Close the database connection
$connect->close();
}
?>