-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhome.php
54 lines (46 loc) · 1.6 KB
/
home.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
48
49
50
51
52
53
54
<!-- <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>PhoneBook Home</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css">
</head>
<body> -->
<?php
session_start();
if (isset($_SESSION['id'])) {
$title = 'PhoneBook Home';
include ('./header.php');
include ('./connection.php');
$user_id = $_SESSION['id'];
$retrieveImageQuery = "SELECT picture FROM registeration WHERE user_id = '$user_id'";
$retrieveImage = $con -> query($retrieveImageQuery);
if ($retrieveImage) {
// print 'asdfgh';
$row = $retrieveImage -> fetch_assoc();
} else {
print 'no image found, please upload one!';
}
} else {
header('location: ./index.php');
}
?>
<div class="container" style="margin-top: 5%;">
<div class="row">
<div class="center">
<img src="./images/<?php echo $row['picture']; ?>" height="150" width="150" style="border-radius: 50%;">
</div>
</div>
<div class="row">
<div class="center">
<a href="./add-contact.php" class="waves-effect waves-light btn">Add Contact</a>
<a href="./add-group.php" class="waves-effect waves-light btn">Add Group</a>
<a href="./deactivate.php" class="waves-effect waves-light btn">Deactivate Account</a>
</div>
</div>
</div>
<!-- Compiled and minified JavaScript -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js"></script>
</body>
</html>