-
Notifications
You must be signed in to change notification settings - Fork 0
/
settings.php
53 lines (39 loc) · 1.82 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
<?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>
Email: <input type="text" name="email" value="<?php echo $email; ?>" id="settings_input"><br>
<?php echo $message; ?>
<input type="submit" name="update_details" id="save_details" value="Update Details" class="info settings_submit"><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 Again: <input type="password" name="new_password_2" id="settings_input"><br>
<?php echo $password_message; ?>
<input type="submit" name="update_password" id="save_details" value="Update Password" class="info settings_submit"><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="danger settings_submit">
</form>
</div>