forked from hariharanrr01/H-COURSE
-
Notifications
You must be signed in to change notification settings - Fork 1
/
profile.php
47 lines (42 loc) · 1.32 KB
/
profile.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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?php
session_start();
if (isset($_SESSION['id']) && isset($_SESSION['fname'])) {
include "db_conn.php";
include 'User.php';
$user = getUserById($_SESSION['id'], $conn);
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Home</title>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
<link rel="stylesheet" type="text/css" href="../css/style.css">
<script src="../js/profile.js"></script>
</head>
<body onload="pop()">
<?php if ($user) { ?>
<div class="d-flex justify-content-center align-items-center vh-100">
<div class="shadow w-350 p-3 text-center">
<img src="../assets/upload/<?=$user['pp']?>"
class="img-fluid rounded-circle">
<h3 class="display-4 "><?=$user['fname']?></h3>
<a href="edit.php" class="btn btn-primary">
Edit Profile
</a>
<a href="logout.php" class="btn btn-warning">
Logout
</a>
</div>
</div>
<?php }else {
header("Location: login.php");
exit;
} ?>
</body>
</html>
<?php }else {
header("Location: login.php");
exit;
} ?>