-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpassword_exist.php
More file actions
91 lines (73 loc) · 1.58 KB
/
password_exist.php
File metadata and controls
91 lines (73 loc) · 1.58 KB
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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Enter correct Password</title>
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/font-awesome.min.css">
<style type="text/css">
body {
background-color: #7d1a9b;
}
.panel{
margin-top: 160px;
font-size: 16px;
font-weight: bold;
}
.fa
{
font-size: 38px;
color: orange;
}
.forget
{
color: #cebec9;
}
</style>
</head>
<body>
<nav class="navbar navbar-default navbar-fixed-top">
<div class="container">
<h3 align="center">Kitchen diary</h3>
</div>
</div>
</nav>
<div class="containe">
<div class="pane">
<div class="panel-body">
<?php
session_start();
$name=$_SESSION['name'];
$user=implode($name);
if(isset($_POST['password']))
{
include("./database/db_connection.php");
$password=mysqli_real_escape_string($con,$_POST["password"]);
$decrypt=sha1($password);
$query=mysqli_query($con, "SELECT password FROM user WHERE password='$decrypt' AND uname='$user'");
if(mysqli_num_rows($query)>=1)
{
header("location:enterpurchase.php");
}
else
{
?>
<div class="panel">
<div class="text-center">
<i class="fa fa-ban" aria-hidden="true"></i>
<div class="panel-body">
<p>Sorry,You entered an Incorrect Password</p>
</div>
</div></div></div>
<?php
}
}
$con->close();
?>
<div class="text-center">
<button class="btn btn-info" onclick="location.href='enter_password.php'">Try Again</button><br><br>
<a class="forget" href='forgetpwd.php'">Forget Password!</a>
</div>
</body>
</html>