-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshow.php
More file actions
37 lines (33 loc) · 784 Bytes
/
show.php
File metadata and controls
37 lines (33 loc) · 784 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
36
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Todo
</title>
</head>
<body>
<?php
if(session_status() === PHP_SESSION_NONE){
session_start();
}
if(isset($_SESSION['email'])){
include "connect.php";
$id = $_SESSION['id'];
$sql = "Select value FROM todo WHERE userID = '$id' ";
$result = mysqli_query($conn, $sql);
$row = mysqli_fetch_assoc($result);
foreach ($row as $data )
{
echo $data."<br>";
}
echo "<a href='/logout.php'>logout</a>";
}
else{
echo "<a href='/login.html'>login</a><br>";
echo "<a href='/register.php'>register</a>";
}
?>
</body>
</html>