-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
94 lines (86 loc) · 3.29 KB
/
index.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<?php
session_start();
include('includes/config.php');
if(isset($_POST['signin']))
{
$email=$_POST['email'];
$password=md5($_POST['password']);
$sql ="SELECT * FROM register where email ='$email' AND password ='$password'";
$query= mysqli_query($conn, $sql);
$count = mysqli_num_rows($query);
if($count > 0)
{
while ($row = mysqli_fetch_assoc($query)) {
$_SESSION['alogin']=$row['user_ID'];
echo "<script type='text/javascript'> document.location = 'notebook.php'; </script>";
}
}
else{
echo "<script>alert('Invalid Details');</script>";
}
}
?>
<!DOCTYPE html>
<html lang="en" class="bg-dark">
<head>
<meta charset="utf-8" />
<title>Notebook | Web Application</title>
<meta name="description" content="app, web app, responsive, admin dashboard, admin, flat, flat ui, ui kit, off screen nav" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
<link rel="stylesheet" href="css/bootstrap.css" type="text/css" />
<link rel="stylesheet" href="css/animate.css" type="text/css" />
<link rel="stylesheet" href="css/font-awesome.min.css" type="text/css" />
<link rel="stylesheet" href="css/font.css" type="text/css" />
<link rel="stylesheet" href="css/app.css" type="text/css" />
<!--[if lt IE 9]>
<script src="js/ie/html5shiv.js"></script>
<script src="js/ie/respond.min.js"></script>
<script src="js/ie/excanvas.js"></script>
<![endif]-->
</head>
<body>
<section id="content" class="m-t-lg wrapper-md animated fadeInUp">
<div class="container aside-xxl">
<a class="navbar-brand block" href="login.php">Notebook</a>
<section class="panel panel-default bg-white m-t-lg">
<header class="panel-heading text-center">
<strong>Login Form</strong>
</header>
<form name="signin" method="post">
<div class="panel-body wrapper-lg">
<div class="form-group">
<label class="control-label">Email</label>
<input name="email" type="email" placeholder="[email protected]" class="form-control input-lg">
</div>
<div class="form-group">
<label class="control-label">Password</label>
<input name="password" type="password" id="inputPassword" placeholder="Password" class="form-control input-lg">
</div>
<div class="line line-dashed"></div>
<button name="signin" type="submit" class="btn btn-primary btn-block">Login</button>
<div class="line line-dashed"></div>
<p class="text-muted text-center"><small>Do not have an account?</small></p>
<a href="signup.php" class="btn btn-default btn-block">Create an account</a>
</div>
</form>
</section>
</div>
</section>
<!-- footer -->
<footer id="footer">
<div class="text-center padder">
<p>
<small>Notebook | Web Application <br>© 2021</small>
</p>
</div>
</footer>
<!-- / footer -->
<script src="js/jquery.min.js"></script>
<!-- Bootstrap -->
<script src="js/bootstrap.js"></script>
<!-- App -->
<script src="js/app.js"></script>
<script src="js/app.plugin.js"></script>
<script src="js/slimscroll/jquery.slimscroll.min.js"></script>
</body>
</html>