Repository navigation
Expand file tree
/
Copy pathprofile.php
More file actions
59 lines (54 loc) · 1.4 KB
/
Copy pathprofile.php
File metadata and controls
59 lines (54 loc) · 1.4 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
59
<?php
include 'processing.php';
// We need to use sessions, so you should always start sessions using the below code or including processing php to get other session data AND MYSQLI FETCH data.
// If the user is not logged in redirect to the login page...
if (!isset($_SESSION['user_id'])) {
header('Location: index.html');
exit;
}
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Profile Page</title>
<link href="style3.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="css/bootstrap.min.css">
</head>
<body class="loggedin">
<nav class="navtop">
<div>
<h3>Namilyango vote</h3>
<a href="<?php echo $_SESSION['house']; ?>"> <i class="fas fa-sign-out-alt"></i>Back To Home</a> 
<a href="logout.php"><i class="fas fa-sign-out-alt"></i>Logout</a> 
</div>
</nav>
<div class="content">
<h2>Profile Page</h2>
<div>
<p>Your account details are below:</p>
<table>
<tr>
<td>Username:</td>
<td><?=$_SESSION['user_id']?></td>
</tr>
<tr>
<td>Password:</td>
<td> Please Contact your Administration for inquiries.</td>
</tr>
<tr>
<td>house:</td>
<td><?php if (isset($_SESSION['user_house'])) {
echo $_SESSION['user_house'] ;
}else {
} ?></td>
</tr>
<tr>
<td>hostel:</td>
<td><?php echo ""?></td>
</tr>
</table>
</div>
</div>
</body>
</html>