-
Notifications
You must be signed in to change notification settings - Fork 1
/
user_settings.php
91 lines (90 loc) · 4.47 KB
/
user_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
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
<head>
<title>KhataBook | User Settings</title>
</head>
<?php
include('config.php');
session_start();
if (!isset($_SESSION['user'])) {
header("location:index.php");
}
include('header.php');
?>
<?php
$newqry5 = "SELECT * FROM login_details WHERE email='" . $_SESSION['user'] . "'";
$query5 = mysqli_query($conn, $newqry5);
while ($row5 = mysqli_fetch_array($query5)) { ?>
<div class="col-md-6" style="margin: auto;">
<form class="card" action="user_settings_process.php" method="POST">
<div class="card-header">
<h3 class="card-title">Edit / Delete Account</h3>
</div>
<div class="card-body">
<div class="mb-3 row">
<label class="col-3 col-form-label required">Your Name</label>
<div class="col">
<input type="text" name="customer_name" class="form-control" autocomplete="off" required value="<?php echo $row5['customer_name']; ?>">
</div>
</div>
<div class="row">
<label class="col-3 col-form-label pt-0">Your Mobile No.</label>
<div class="col">
<input type="number" name="mobile_no" class="form-control" autocomplete="off" required value="<?php echo $row5['mobile_no']; ?>">
</div>
</div><br>
<div class="row">
<label class="col-3 col-form-label pt-0 required">Country</label>
<div class="col">
<select class="form-control form-select" value="<?php echo $row5['country']; ?>" name="country">
<option value="India">India</option>
<option value="Canada">Canada</option>
<option value="USA">USA</option>
<option value="Australia">Australia</option>
<option value="France">France</option>
<option value="Germany">Germany</option>
<option value="United Kingdom">United Kingdom</option>
<option value="China">China</option>
<option value="Russia">Russia</option>
</select>
</div>
</div><br>
<div class="mb-3 row">
<label class="col-3 col-form-label required">Your Email</label>
<div class="col">
<input type="email" readonly name="email" autocomplete="off" style="background-color:aliceblue; cursor:not-allowed;" value="<?php echo $row5['email']; ?>" required class="form-control">
</div>
</div>
<div class="mb-3 row">
<label class="col-3 col-form-label required">Your Password</label>
<div class="col">
<input type="text" name="password" autocomplete="off" value="<?php echo $row5['password'];
} ?>" required class="form-control">
</div>
</div>
<div class="card-footer text-end">
<input type="submit" style="width: 100%;" value="Update Record" class="btn btn-success">
</div>
</form>
</div>
<?php
$newqry6 = "SELECT * FROM login_details WHERE email='" . $_SESSION['user'] . "'";
$query6 = mysqli_query($conn, $newqry6);
while ($row6 = mysqli_fetch_array($query6)) { ?>
<div class="col-12" style="margin-bottom:20px;">
<div class="card">
<div class="card-header">
<h3 class="card-title">Delete My Account</h3>
</div>
<div class="card-body">
<div class="row row-cards">
<div class="card-footer text-end" style="margin-top:10px;">
<a href="user_settings_delete_process.php?id=<?php echo $row6['id'];
} ?>"><input type="submit" style="width: 100%;" value="Delete Account" class="btn btn-danger">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>