-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsettings.php
62 lines (47 loc) · 1.92 KB
/
settings.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
<?php
include("includes/header.php");
include("includes/form_handlers/settings_handler.php");
?>
<div class = "main_column column">
<h4>Account Settings</h4>
<?php
echo "<img src = '".$user['profile_pic']."' class = 'small_profile_pic'>";
?>
<br>
<a href = 'upload.php'>Upload new Profile Picture </a><br><br><br>
Modify the values and click "Update Details"
<?php
$user_data_query = mysqli_query($con, "SELECT first_name, last_name, email FROM users WHERE username = '$userLoggedIn'");
$row = mysqli_fetch_array($user_data_query);
$first_name = $row['first_name'];
$last_name = $row['last_name'];
$email = $row['email'];
?>
<form action = "settings.php" method= "POST">
First Name : <input type = "text" name = "first_name" value = "<?php echo $first_name?>" id = "settings_input">
<br>
Last Name : <input type = "text" name = "last_name" value = "<?php echo $last_name?>" id = "settings_input">
<br>
User Email : <input type = "email" name = "email" value = "<?php echo $email?>" id = "settings_input">
<br>
<?php echo $message;?>
<input type = 'submit' name = "update_details" id ='save_details' value = "Update" class= 'settings_submit info'>
<br>
</form>
<h4>Change Password</h4>
<form action = "settings.php" method= "POST">
Old Password : <input type = "password" name = "old_password" id = "settings_input">
<br>
New Password : <input type = "password" name = "new_password_1" id = "settings_input">
<br>
New Password : <input type = "password" name = "new_password_2" id = "settings_input">
<br>
<?php echo $password_message;?>
<input type = 'submit' name = "update_password" id ='update_password' value = "Update Password" class = "settings_submit info">
<br>
</form>
<h4>Close Account</h4>
<form action = 'settings.php' method= "POST">
<input type = 'submit' name = "close_account" id ='close_account' value = "Close Account" class = 'settings_submit danger'>
</form>
</div>