-
Notifications
You must be signed in to change notification settings - Fork 0
/
EditCustomerAcc.html
executable file
·139 lines (52 loc) · 2.29 KB
/
EditCustomerAcc.html
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
127
128
129
130
131
132
133
134
135
136
137
138
139
!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Quikshop Mobile</title>
<link rel="stylesheet" href="https://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.css" />
<script type="text/javascript" src="https://code.jquery.com/jquery-1.8.2.min.js"></script>
<script type="text/javascript" src="https://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.js"></script>
<meta content="width=device-width, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport" refresh="true" />
</head>
<body>
<div data-role="page" data-theme="b">
<div data-role="header" data-theme="b">
<h1><img src="logo.png" width="126" height="26" align="middle" /></h1>
<a href="help.html" data-icon="info" class="ui-btn-right" position:absolute top:50% data-transition="slide">Help</a>
<a href="scanner.html" class="ui-btn-left" data-icon="arrow-l" data-iconpos="left" data-transition="slide" data-direction="reverse">Back</a>
</div>
<div data-role="content">
<div id="landmark-1" data-landmark-id="1">
</div>
</div>
<html lang= 'en'>
<head>
<body>
<font size="18">
<center>
<p>Your account has been updated!
</p>
</center>
</font>
</body>
</head>
</html>
</div>
<?php
//creating connection
$mysqli = new mysqli("quikshop.co","cx300_cen3031","[cEn..3031!]","cx300_quikshop");
//I am updating UserId and cartId with the session variables (global variables)
$userID = $_SESSION['userID'];
//$cartID = $_SESSION['currCartId'];
$fname = mysqli_real_escape_string($mysqli,$_POST['fname']);
$lname = mysqli_real_escape_string($mysqli,$_POST['lname']);
$email = mysqli_real_escape_string($mysqli,$_POST['email']);
$password = mysqli_real_escape_string($mysqli,$_POST['password']);
$passwordHashed = password_hash($password, PASSWORD_DEFAULT);
//here we are querying the db
$query = "UPDATE Users SET firstName= '$fname' , lastName= '$lname', email = '$email', passHash = '$passwordHashed' WHERE userID = '$userID'";
//here we are making the call
$result = $mysqli->query($query) or die( $mysqli->error );
$mysqli->close();
?>
</body>
</html>