-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathchange_password.php
71 lines (60 loc) · 1.58 KB
/
change_password.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
<!-- Reset Password Form -->
<?php
session_start();
?>
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="css/reset.css">
<link rel="stylesheet" href="css/change_password.css">
<link rel="stylesheet" href="css/menu.css">
<meta name="viewport" content="width=device-width, user-scalable=yes" />
<link rel="stylesheet" href="fonts/css/font-awesome.min.css">
<title>Camagru</title>
</head>
<body>
<?php
$rootname = getcwd();
require_once($rootname.'/nav/menu.php');
menu();
?>
<div id="redirect">
<p id="message"><?php
require_once('config/function_sql.php');
$connect = connectToDatabase();
if(!$connect)
{
echo "An error occured";
exit();
}
if($_GET['uname'] === "" || $_GET['rkey'] === ""){
echo "Invalid Username or Key";
exit();
}
$result_id = username_check($connect,$_GET['uname']);
if ($result_id['mail_check'] === $_GET['rkey'])
echo "Please enter your new password";
else{
echo "An error occured";
exit();
}
?>
</p>
<form id="decathlon" method="post">
<input id="username" type="text" placeholder="Username or Email" value=<?php echo $_GET['uname'] ?> >
<input id="rkey" type="text" placeholder="Username or Email" value=<?php echo $_GET['rkey'] ?> >
<input id="password" type="password" placeholder="type password">
<input id="password_check" type="password" placeholder="type password again">
<div id="submit">
<a href="#"><p>Submit</p>
</div></a>
</form>
</div>
</body>
<script type="text/javascript" src="javascript/change_password.js"></script>
<?php
$rootname = getcwd();
require_once($rootname.'/script/script.php');
script();
?>
</html>