-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmy_account.php
126 lines (122 loc) · 8.64 KB
/
my_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
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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
<?php
include('header.php');
if(!isset($_SESSION['USER_LOGIN'])){
redirect(constant('FETCH_PATH').'shop');
}
?>
<div class="myaccount-area pb-80 pt-100">
<div class="container">
<div class="row">
<div class="ml-auto mr-auto col-lg-9">
<div class="checkout-wrapper">
<div id="faq" class="panel-group">
<div class="panel panel-default">
<div class="panel-heading">
<h5 class="panel-title"><span>1</span> <a data-toggle="collapse" data-parent="#faq" href="#my-account-1">Edit your account information </a></h5>
</div>
<div id="my-account-1" class="panel-collapse collapse show">
<div class="panel-body">
<div class="billing-information-wrapper">
<div class="account-info-wrapper">
<h4>My Account Information</h4>
<h5>Your Personal Details</h5>
</div>
<form method="post" class="account_form">
<div class="row">
<div class="col-lg-6 col-md-6">
<?php
$id=$_SESSION['USER_ID'];
$smtm=$con->prepare("select * from user where id='$id'");
$smtm->execute();
$row=$smtm->fetch(PDO::FETCH_ASSOC);
?>
<div class="billing-info">
<label>Name</label>
<input type="text" class="account_name" required value="<?php echo $row['name']?>">
</div>
</div>
<div class="col-lg-6 col-md-6">
<div class="billing-info">
<label>Mobile</label>
<input type="text" class="account_mobile" required value="<?php echo $row['mobile']?>">
</div>
</div>
<div class="col-lg-12 col-md-12">
<div class="billing-info">
<label>Email Address</label>
<input type="email" class="text-secondary" readonly value="<?php echo $row['email']?>">
</div>
<span class=" mt-4 account_message text-danger"></span>
</div>
</div>
<div class="billing-back-btn">
<div class="billing-back">
<a href="javascript:void(0)"><i class="ion-arrow-up-c"></i> back</a>
</div>
<div class="billing-btn">
<button type="submit"class=" account_button">Continue</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
<?php
if($row['password'] !=''){
?>
<div class="panel panel-default">
<div class="panel-heading">
<h5 class="panel-title"><span>2</span> <a data-toggle="collapse" data-parent="#faq" href="#my-account-2">Change your password </a></h5>
</div>
<div id="my-account-2" class="panel-collapse collapse">
<div class="panel-body">
<div class="billing-information-wrapper">
<div class="account-info-wrapper">
<h4 class="">Change Password</h4>
</div>
<form method="post" class="password_form">
<div class="row">
<div class="col-lg-12 col-md-12">
<div class="billing-info">
<label>Old Password</label>
<input type="text" class="old_password" required>
</div>
</div>
<div class="col-lg-12 col-md-12">
<div class="billing-info">
<label>New Password</label>
<input type="text" class="new_password" required>
</div>
</div>
<div class="col-lg-12 col-md-12">
<div class="billing-info">
<label>Password Confirm</label>
<input type="text" class="password_confirm" required>
</div>
<span class=" mt-4 password_message text-danger"></span>
</div>
</div>
<div class="billing-back-btn">
<div class="billing-back">
<a href="javascript:void(0)"><i class="ion-arrow-up-c"></i> back</a>
</div>
<div class="billing-btn">
<button type="submit" class="password_button">Continue</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
<?php }else{echo "<span class='text-danger'>You are logged in through google so no password change is available</span>";}?>
</div>
</div>
</div>
</div>
</div>
</div>
<?php
include('footer.php');
?>