-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathedit_profile.php
102 lines (60 loc) · 3.98 KB
/
edit_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
<!--header-->
<?php require_once 'includes/header.php'; ?>
<!--navbar-->
<?php require_once 'includes/navbar.php'; ?>
<div class="container">
<div class="row">
<div class="col-md-6 mx-auto">
<div class='card card-body bg-light mt-5'>
<h2>Update Your account Details</h2>
<p>
<?php
echo getMsg('msg');
$err = getMsg('errors');
?>
</p>
<form action="<?php echo(URLROOT); ?>/process/edit_profile.php" method='POST' enctype="multipart/form-data">
<div class="form-group">
<label for='name'>Name: <sup>*</sup></label>
<input type='name' name="name" value="<?php echo($user->name); ?>" class="form-control form-control-lg <?php echo(isset($err['name_err'])) ? 'is-invalid' : ''; ?>">
<span class="invalid-feedback"><?php echo($err['name_err']); ?></span>
</div>
<div class="form-group">
<label for='username'>Username: <sup>*</sup></label>
<input type='text' name="username" value="<?php echo($user->username); ?>" class="form-control form-control-lg <?php echo(isset($err['username_err'])) ? 'is-invalid' : ''; ?>">
<span class="invalid-feedback"><?php echo($err['username_err']); ?></span>
</div>
<div class="form-group">
<label for='email'>Email: <sup>*</sup></label>
<input type='email' name="email" value="<?php echo($user->email); ?>" class="form-control form-control-lg <?php echo(isset($err['email_err'])) ? 'is-invalid' : ''; ?>">
<span class="invalid-feedback"><?php echo($err['email_err']); ?></span>
</div>
<div class="form-group">
<label for='url'>Your Website URL: <sup>*</sup></label>
<input type='text' name="website" value="<?php echo($user->website); ?>" class="form-control form-control-lg <?php echo(isset($err['website_err'])) ? 'is-invalid' : ''; ?>">
<span class="invalid-feedback"><?php echo($err['website_err']); ?></span>
</div>
<div class="form-group w-50" id="imageBox" >
<img src="<?= URLROOT.'/images/'.$user->image; ?>" alt="" class="img-responsive w-100">
<a href="#" class="" id="uploadNewImage">Click here to upload</a>
</div>
<div class="form-group" id='imageUpload'>
<label for='url'>Upload Image: <sup>*</sup></label>
<input type='file' name="image" class="form-control form-control-lg <?php echo(isset($err['image_err'])) ? 'is-invalid' : ''; ?>">
<span class="invalid-feedback"><?php echo($err['image_err']); ?></span>
</div>
<div class="row">
<div class='col'>
<input type='submit' name='edit' value='Update Now' class='btn color-set btn-block'>
</div>
<div class='col'>
<a href="<?php echo(URLROOT); ?>/change_password.php" class="btn btn-light btn-block">Wanna Change Password? </a>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
<!--footer-->
<?php require_once 'includes/footer.php'; ?>