-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheditInfo.php
220 lines (185 loc) · 5.27 KB
/
editInfo.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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
<?php
include 'maindb.php';
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="main.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script>
</script>
</head>
<style>
body {font-family: Arial, Helvetica, sans-serif;
text-align: center;
}
* {box-sizing: border-box}
form {
border: 3px solid #f1f1f1;
max-width: 40%;
display: inline-block;
}
/* Full-width input fields */
input[type=text], input[type=password] {
width: 100%;
padding: 15px;
margin: 5px 0 22px 0;
display: inline-block;
border: none;
background: #f1f1f1;
}
input[type=text]:focus, input[type=password]:focus {
background-color: #ddd;
outline: none;
}
hr {
border: 1px solid #f1f1f1;
margin-bottom: 25px;
}
/* Set a style for all buttons */
button {
background-color: #04AA6D;
color: white;
padding: 14px 20px;
margin: 8px 0;
border: none;
cursor: pointer;
width: 100%;
opacity: 0.9;
}
button:hover {
opacity:1;
}
/* Extra styles for the cancel button */
.cancelbtn {
padding: 14px 20px;
background-color: #f44336;
}
/* Float cancel and signup buttons and add an equal width */
.cancelbtn, .signupbtn {
float: center;
width: 50%;
}
/* Add padding to container elements */
.container {
padding: 16px;
}
/* Clear floats */
.clearfix::after {
content: "";
clear: both;
display: table;
}
/* Change styles for cancel button and signup button on extra small screens */
@media screen and (max-width: 300px) {
.cancelbtn, .signupbtn {
width: 100%;
}
}
#content{
width: 50%;
margin: 20px auto;
border: 1px solid #cbcbcb;
}
/* form{
width: 50%;
margin: 20px auto;
}
form div{
margin-top: 5px;
} */
#img_div{
width: 80%;
padding: 5px;
margin: 15px auto;
border: 1px solid #cbcbcb;
}
#img_div:after{
content: "";
display: block;
clear: both;
}
img{
float: left;
margin: 5px;
width: 300px;
height: 140px;
}
</style>
<body>
<!-- <h1>HELLO TESTING</h1>
<button type="button" class="logout" onclick="window.location.href='index.html';">Logout</button> -->
<!-- <div id="comments">
</div> -->
<div class="w3-sidebar w3-bar-block w3-card w3-animate-left" style="display:none" id="mySidebar">
<button class="w3-bar-item w3-button w3-large"
onclick="w3_close()">Close ×</button>
<a href="#" class="w3-bar-item w3-button">Edit Information</a>
<a href="notifications.php" class="w3-bar-item w3-button">Notifications</a>
<a href="messages.php" class="w3-bar-item w3-button">Direct Message</a>
<a href="projects.php" class="w3-bar-item w3-button">Projects</a>
<a href="bug.php" class="w3-bar-item w3-button">Bugs</a>
<a href="main.php" class="w3-bar-item w3-button">Main Page</a>
<a href="index.html" class="w3-bar-item w3-button">Logout</a>
</div>
<div id="main">
<div class="w3-teal">
<button id="openNav" class="w3-button w3-teal w3-xlarge" onclick="w3_open()">☰</button>
<div class="w3-container">
<h1><b>Edit My Information<b></h1>
</div>
</div>
<div class="w3-container">
<?php
session_start();
$email =$_SESSION['formdata'];
echo "<h1>Username: ";
echo $email;
echo "</h1>";
// session_start();
// $email =$_SESSION['formdata'];
session_abort();
?>
</div>
<?php
// session_start();
$holder=$_SESSION['formdata']; //or whatever
$_SESSION['formdata'] = $holder;
?>
<form action="newPass.php" method="post" style="border:1px solid #ccc">
<div class="container">
<h1>Change Password</h1>
<p>Please type new password for this account</p>
<hr>
<label for="psw"><b>Password</b></label>
<input type="password" placeholder="Enter Password" name="psw" required>
<label for="psw-repeat"><b>Repeat Password</b></label>
<input type="password" placeholder="Repeat Password" name="psw-repeat" required>
<label>
<input type="checkbox" checked="checked" name="remember" style="margin-bottom:15px"> Remember me
</label>
<div class="clearfix">
<button type="submit" class="signupbtn">Update</button>
</div>
</div>
</form>
</div>
<script>
function w3_open() {
document.getElementById("main").style.marginLeft = "25%";
document.getElementById("mySidebar").style.width = "25%";
document.getElementById("mySidebar").style.display = "block";
document.getElementById("openNav").style.display = 'none';
}
function w3_close() {
document.getElementById("main").style.marginLeft = "0%";
document.getElementById("mySidebar").style.display = "none";
document.getElementById("openNav").style.display = "inline-block";
}
</script>
</body>
</html>