-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathupdate_avatar.php
More file actions
59 lines (41 loc) · 1.69 KB
/
Copy pathupdate_avatar.php
File metadata and controls
59 lines (41 loc) · 1.69 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
<?php
//Define Page Title
$page_title = "Update Information - LetsMeet";
include('includes/header.php');
$loggedUser = $_SESSION['user_id'];
if(isset($_POST["submit"]) && isset($_FILES['avatar']['name'])){
$result = $user_obj->changeAvatar($_FILES['avatar']['name'], $loggedUser);
}
?>
<div class="jumbotron jumbotron-fluid">
<div class="container text-center">
<h3 class=""> Change your face <b><?php echo $user_data->username;?></b></h1>
<div class="alert alert-danger">Upload your desire profile display image</div>
</div>
</div>
<div class="container">
<div class="box-bg">
<div>
<?php
if(isset($result['errorMessage'])){
echo "<div class='alert alert-danger text-center'>".$result['errorMessage']."</div>";
}
if(isset($result['successMessage'])){
echo "<div class='alert alert-success text-center'>".$result['successMessage']."</div>";
}
?>
</div>
<form method="post" action="" enctype="multipart/form-data">
<div class="text-center">
Select Image File to Upload
</div>
<div style="max-width:500px; margin:auto;">
<input class="form-control" type="file" name="avatar">
</div>
<div class="d-flex justify-content-center pt-4">
<button type="submit" name="submit" class="btn btn-success">Change Image</button>
</div>
</form>
<div class="p"></div>
</div>
</div>