-
Notifications
You must be signed in to change notification settings - Fork 0
/
close_account.php
30 lines (22 loc) · 954 Bytes
/
close_account.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
<?php
include("includes/header.php");
if(isset($_POST['cancel'])) {
header("Location: settings.php");
}
if(isset($_POST['close_account'])) {
$close_query = mysqli_query($con, "UPDATE users SET user_closed='yes' WHERE username='$userLoggedInName'")
or die(mysqli_error($con));
session_destroy();
header("Location: register.php");
}
?>
<div class="main_column column">
<h4>Close Account</h4>
Are you sure you want to close your account?<br><br>
Closing your account will hide your profile and all your activity from other users.<br><br>
You can re-open your account at any time by simply logging in.<br><br>
<form action="close_account.php" method="POST">
<input type="submit" name="close_account" id="close_account" value="Yes! Close it!" class="danger settings_submit">
<input type="submit" name="cancel" id="update_details" value="No way!" class="info settings_submit">
</form>
</div>