-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmyprofile.php
53 lines (39 loc) · 1.39 KB
/
myprofile.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
<?php
session_start();
include "config/db.php";
include "templates/htmlheader.php";
include "functions/systemfunctions.php";
checksignin();
$userid = $_SESSION['id'];
$getprofile = "select * from user where id = $userid";
$result = mysqli_query($db, $getprofile);
$user = mysqli_fetch_assoc($result);
?>
<div class="row">
<div class="col-md-6 offset-md-2">
<h1>My Profile</h1>
<hr>
</div>
</div>
<div class="row">
<div class="col-md-6 offset-md-2">
Last Name: <?= $user['lastname'] ?> <br>
First Name: <?= $user['firstname'] ?><br>
Middle Name: <?= $user['middlename'] ?><br>
Extension: <?= $user['extension'] ?><br>
Email: <?= $user['email'] ?><br>
Date of Birth: <?= $user['dateofbirth'] ?><br>
</div>
<div class="col-md-2">
<?php if($user['imageid'] == "") { ?>
<form action="uploadprofilepic.php" method="post" enctype="multipart/form-data">
<input type="file" name="file" class="form-control">
<br>
<input type="submit" name="upload" value="Upload" class="btn btn-danger btn-sm">
</form>
<?php } else { ?>
<img class="img-fluid max-width: 100% height: auto" src="assets/profileimages/<?= $user['imageid'] ?>" alt="myprofilepic">
<?php }?>
</div>
</div>
<?php include "templates/footer.php"; ?>