-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathadmin_profile.php
106 lines (80 loc) · 3.18 KB
/
admin_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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
<?php
include("assets/header_admin.php");
include("connection.php");
// error_reporting(0);
session_start();
$pass = $_SESSION['pass'];
$email = $_SESSION['email'];
$userprofile = $_SESSION['email'];
if($userprofile == true){
} else {
header('location:login.php');
}
$query = "SELECT * FROM users_table WHERE email = '$email' AND pass = '$pass'";
$data = mysqli_query($conn,$query);
$result = mysqli_fetch_assoc($data);
?>
<html>
<head>
<!-- CSS -->
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="css/bootstrap.min.css">
<!-- JS -->
<script src="js/script.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery-3.7.1.min.js"></script>
<title>Profile</title>
</head>
<body data-bs-spy="scroll" data-bs-target=".navbar" data-bs-offset="100">
<section class="layout_padding">
<div class="container">
<div class="row">
<div class="col-md-5 user-image">
<div class="profile-img" style="border-radius: 50%; overflow: hidden; width: 250px; height: 250px;">
<img src="<?php echo $result['image']; ?>" style="width: 100%; height: 100%; object-fit: cover;" alt="Profile Image">
</div>
<!-- <div class="profile-edits">
<br><br><br>
<a href="#">
<input type="button" value="Update Picture" class="upd-button">
</a>
<a href="#">
<button class="upd-button">bgfbg</button>
</a>
</div> -->
</div>
<div class="col-md-5">
<h3>Welcome, <?php echo $result['name']; ?>!</h3>
<h5><?php echo $result['access']; ?></h5>
<br><br>
<table class="table table-borderless layout_padding2-top">
<tr>
<th scope="col">Your Name</th>
<td><?php echo $result['name']; ?></td>
</tr>
<tr>
<th scope="col">Email Address</th>
<td><?php echo $email ?></td>
</tr>
<tr>
<th scope="col">Phone Number</th>
<td><?php echo $result['phone']; ?></td>
</tr>
<tr>
<th scope="col">ID Number</th>
<td><?php echo $result['id']; ?></td>
</tr>
<tr>
<th scope="col">Location</th>
<td><?php echo $result['location']; ?></td>
</tr>
<tr>
<th scope="col">Handle</th>
<td><?php echo '@'.$result['handle']; ?></td>
</tr>
</table>
<a href='edit_profile.php?id=$result[id]'><input type='submit' class='btn btn-outline-success' value = 'Edit Profile'></a>
</div>
</div>
</div>
</section>