-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrest_password.php
More file actions
32 lines (30 loc) · 950 Bytes
/
rest_password.php
File metadata and controls
32 lines (30 loc) · 950 Bytes
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
<?php
session_start();
require('database.php');
$toDatabase = new database();
if(isset($_SESSION["email_input"])){
if(isset($_POST["change_password_input"])){
$toDatabase->ChangePassword($_SESSION["email_input"],$_POST['new_password']);
}else echo 'press the btn';
}else {
echo 'email does not match you cant chagne the password';
header('Location : sign_in.php');
exit();
}
session_destroy();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Authentication app </title>
</head>
<body>
<form action="rest_password.php" method="post">
<label for="new_password">Enter new Password </label>
<input type="password" maxlength="30" class="password_input" id="new_password" name="new_password">
<button type="submit" name="change_password_btn">Change password</button>
</form>
</body>
</html>