-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuser.php
More file actions
58 lines (51 loc) · 1.95 KB
/
Copy pathuser.php
File metadata and controls
58 lines (51 loc) · 1.95 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<?php
session_start();
if (!isset($_SESSION['unique_id'])) {
header("location: login.php");
}
?>
<!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>User</title>
<link rel="stylesheet" href="./css/user.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
</head>
<body>
<div class="wrapper">
<section class="user">
<header>
<?php
include_once "php/config.php";
$sql = mysqli_query($connect, "SELECT * from chatdata where unique_id ={$_SESSION['unique_id']} ");
if (mysqli_num_rows($sql) > 0) {
$row = mysqli_fetch_assoc($sql);
}
?>
<div class="content">
<img src="image/<?php echo $row['img'] ?>" class="image" alt="">
<div class="details">
<span style="font-weight: bold">
<?php echo $row['fname'] . " " . $row['lname'] ?>
</span>
<p style="color: green; font-weight: 600">Online</p>
</div>
</div>
<a href="php/logout.php" onclick="logout()" class="logout">Logout</a>
</header>
<div class="search">
<input type="text" placeholder="Enter Name to Search" name="searchTerm" id="search">
<button class="button" id="searchbtn1">
<i class="fa fa-search" id="searchbtn2"> </i>
</button>
</div>
<div class="contactlist">
</div>
</section>
</div>
<script src="./javascript/user.js"></script>
</body>
</html>