-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathprofile.php
47 lines (41 loc) · 1.86 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
include 'config/database.php';
session_start();
$user_id = $_SESSION['id'];
$sql = "SELECT * FROM alumni_table WHERE id = $user_id";
$result = mysqli_query($conn, $sql);
if ($result) {
$row = mysqli_fetch_array($result);
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>User Profile</title>
<!-- Add Bootstrap CSS link here -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<div class="container mt-4">
<h2>User Profile</h2>
<div class="card" style="width: 18rem;">
<img src="<?php echo $row['profilePicture']; ?>" style="max-width: 150px; margin: auto;" alt="Profile Picture">
<div class="card-body">
<h5 class="card-title"><?php echo $row['name']; ?></h5>
<p class="card-text"><strong>ID:</strong> <?php echo $row['id']; ?></p>
<p class="card-text"><strong>Email:</strong> <?php echo $row['email']; ?></p>
<p class="card-text"><strong>Graduation Year:</strong> <?php echo $row['gradYear']; ?></p>
<p class="card-text"><strong>Major:</strong> <?php echo $row['major']; ?></p>
<p class="card-text"><strong>Occupation:</strong> <?php echo $row['occupation']; ?></p>
<p class="card-text"><strong>Time Created:</strong> <?php echo $row['time']; ?></p>
</div>
</div>
</div>
<!-- Add Bootstrap JS and Popper.js scripts here -->
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@popperjs/[email protected]/dist/umd/popper.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js"></script>
</body>
</html>