-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdone.php
executable file
·31 lines (30 loc) · 1.2 KB
/
done.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
<?php
session_start();
error_reporting(E_ALL & ~E_WARNING & ~E_NOTICE);
include 'dbconfig.php';
$username = $_SESSION['username'];
$sql =$database->query("SELECT * from `notedata` where username='$username' and `status`='done'");
if($_SESSION['loggedin']=="yes"){
if(mysqli_num_rows($sql)>0){
while($sqli = mysqli_fetch_assoc($sql)){
$fetchid = $sqli['id'];
echo "<div class=\"tasks\">
<div class=\"taskheader\">
<h1 class=\"title\">".$sqli['title']."</h1><hr>
<p class=\"description\">".$sqli['description']."</p>
</div>
<div class=\"task-actions\">
<button onclick='pendingTask($fetchid)' class='actions' href=''>Pending</button>
<button onclick='deleteTask($fetchid)' class='actions' href=''>Delete</button>
</div>
</div>";
}
}
else{
echo "<h1>No completed tasks</h1>";
}
}
else{
echo "<h1>Please login to continue!</h1>";
}
?>