-
Notifications
You must be signed in to change notification settings - Fork 0
/
login_form.php
48 lines (43 loc) · 1.3 KB
/
login_form.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
<div class="well">
<h3>Admin Login</h3>
<form method="post" autocomplete="off" action="" id="login_form1">
<div class="form-group">
<label class="control-label">Username:</label>
<input type="text" name="username" class="form-control" required>
</div>
<div class="form-group">
<label class="control-label">Password:</label>
<input type="password" name="password" class="form-control" required>
</div>
<button type="submit" class="btn btn-sm btn-primary">Log in</button>
</form>
</div>
<div class="well">
<label><a href="password.php">Forget Password ?</a></label>
</div>
<script>
$(document).ready(function(){
$("#login_form1").submit(function(e){
e.preventDefault();
var formData = $(this).serialize();
$.ajax({
type: "POST",
url: "login.php",
data: formData,
success: function(html){
if(html=='true')
{
$.jGrowl("Loading Project Files Please Wait......", { sticky: true });
$.jGrowl("Welcome to Student's Project Management System", { header: 'Access Granted' });
var delay = 5000;
setTimeout(function(){ window.location = 'dashboard.php' }, delay);
}else
{
$.jGrowl("Please Check your username and Password", { header: 'Login Failed' });
}
}
});
return false;
});
});
</script>