-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathforgotpassword.html
206 lines (177 loc) · 8.44 KB
/
forgotpassword.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
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
<!--#5FCF80 is color-->
<!DOCTYPE html>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<!-- jQuery library -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<!-- Latest compiled JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<style>
.price-table:hover
{
box-shadow: 5px 5px 5px lightgrey, -5px 0px 5px lightgrey;
}
.modal-header
{
background-color:#5FCF80;
}
body
{
background: url('reviewback.jpg') no-repeat;
}
a,a:hover
{
text-decoration: none;
color:black;
}
</style>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>learntocode.com</title>
<meta name="description" content="Free Bootstrap Theme by BootstrapMade.com">
<meta name="keywords" content="free website templates, free bootstrap themes, free template, free bootstrap, free website template">
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Open+Sans|Candal|Alegreya+Sans">
<link rel="stylesheet" type="text/css" href="css/font-awesome.min.css">
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="css/imagehover.min.css">
<link rel="stylesheet" type="text/css" href="css/style.css">
<!-- =======================================================
Theme Name: Mentor
Theme URL: https://bootstrapmade.com/mentor-free-education-bootstrap-theme/
Author: BootstrapMade.com
Author URL: https://bootstrapmade.com
======================================================= -->
</head>
<body>
<!--Navigation bar-->
<nav class="navbar navbar-default navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="home.php"><span> Learn to Code</span></a>
</div>
<div class="collapse navbar-collapse" id="myNavbar">
<ul class="nav navbar-nav navbar-right">
<li><a href="home.php">Features</a></li>
<li><a href="home.php">Organisations</a></li>
<li><a href="home.php">Courses</a></li>
<li><a href="home.php">Pricing</a></li>
<li><a href="#" data-target="#login" data-toggle="modal">Log in</a></li>
<li class="btn-trial"><a href="#" data-target="#signin" data-toggle="modal">Sign in</a></li>
</ul>
</div>
</div>
</nav>
<!--/ Navigation bar-->
<div class="modal-dialog modal-sm">
<!-- Modal content no 1-->
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" ><a href='home.php' style='font-size: 30px;color:black;'>×</a></button>
<h4 class="modal-title text-center form-title" style="color:white;">Forgot Password</h4>
</div>
<div class="modal-body padtrbl">
<div class="login-box-body">
<p class="login-box-msg">It will take just few seconds</p>
<div class="form-group">
<form id="loginForm" action="forgotpassword.php" method="get" >
<div class="form-group has-feedback">
<!----- username -------------->
<input class="form-control" placeholder="Username" id="loginid" type="text" autocomplete="off" name="fname"/>
<span style="display:none;font-weight:bold; position:absolute;color: red;position: absolute;padding:4px;font-size: 11px;background-color:rgba(128, 128, 128, 0.26);z-index: 17; right: 27px; top: 5px;" id="span_loginid"></span>
<!---Alredy exists ! -->
<span class="glyphicon glyphicon-user form-control-feedback" style="background-color: rgb(230,230,230);"></span>
</div>
<!-- email-->
<div class="form-group has-feedback">
<input class="form-control" placeholder="Email" id="loginpsw" type="text" autocomplete="off" name="email"/>
<span style="display:none;font-weight:bold; position:absolute;color: grey;position: absolute;padding:4px;font-size: 11px;background-color:rgba(128, 128, 128, 0.26);z-index: 17; right: 27px; top: 5px;" id="span_loginpsw"></span>
<!---Alredy exists ! -->
<span class="glyphicon glyphicon-envelope form-control-feedback" style="background-color: rgb(230,230,230);"></span>
</div>
<div class="form-group has-feedback">
<!----- password -------------->
<input class="form-control" placeholder="New Password" id="loginpsw" type="text" autocomplete="off" name="pwd"/>
<span style="display:none;font-weight:bold; position:absolute;color: grey;position: absolute;padding:4px;font-size: 11px;background-color:rgba(128, 128, 128, 0.26);z-index: 17; right: 27px; top: 5px;" id="span_loginpsw"></span>
<!---Alredy exists ! -->
<span class="glyphicon glyphicon-lock form-control-feedback" style="background-color: rgb(230,230,230);"></span>
</div>
<div class="row">
<div class="col-xs-12">
<div class="checkbox icheck">
</div>
</div>
<div class="col-xs-12">
<button type="submit" class="btn btn-green btn-block btn-flat" >Reset Password</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</body>
<!-- php for forgot password-->
<!--
<?php
if(isset($_GET['fname']))
{
$fname=$_GET["fname"];
$password=$_GET["pwd"];
$email=$_GET["email"];
//$gen=$_GET["gender"];
echo "hi";
if($fname=="" || $password==""|| $email=="" )
{
echo"<center>";
echo "<div class='card text-white bg-danger mb-3' style='max-width: 18rem;'><div class='card-header'>Login unsuccessfull!</div><div class='card-body'><h5 class='card-title'>All inputs are neccessary!</h5><p class='card-text'>All inputs are necessary to log into your account</p><button class='btn-secondary'><a href='http://localhost/ltc/'>Go Back</button></div></div>";
echo "</center>";
}
else
{
if($_SERVER['REQUEST_METHOD']=="GET")//con establish
{
$localhost = "localhost";
$usernamew = "root";
$passw = "";
$db = "expdb";
$conn = mysqli_connect($localhost,$usernamew,$passw,$db);
if(!$conn){
echo "";
}
else
{
echo "";
}
$result=mysqli_query($conn,"select * from exptable where fname='$fname' and email='$email'")
or die("FAILED!!".mysql_error());
$row=mysqli_fetch_array($result);
if($fname=='admin' and $password=='admin'){
header("Location: adminpanel.php");
echo "hello Admin";
}
else
{
if($row['fname']==$fname and $row['email']==$email)
{
$sql = "update exptable SET password='$password' where fname='$fname'";
$result = mysqli_query($conn,$sql);
echo"<center>";
echo "<div class='card text-white bg-success mb-3' style='max-width: 18rem;'><div class='card-header'>Account Password Updated!</div><div class='card-body'><h5 class='card-title'>Hello,".$fname."</h5><p class='card-text'>We were waiting for you to check out your account </p><button class='btn-success'>My Account</button></div></div>";
echo "</center>";
}
else
{
echo"<center>";
echo "<div class='card text-white bg-danger mb-3' style='max-width: 18rem;'><div class='card-header'>Login Failed!</div><div class='card-body'><h5 class='card-title'>Username or Password is incorrect!</h5><p class='card-text'>Looks like you have forgot your username or password </p><button class='btn-danger'><a href='forgotpassword.php'>Forgot Password!</a></button> <button class='btn-secondary'><a href='http://localhost/ltc/'>Go Back!</a></button></div></div>";
echo "</center>";
}
}
}}}
?>-->