-
Notifications
You must be signed in to change notification settings - Fork 0
/
login.php
176 lines (158 loc) · 7.56 KB
/
login.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
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
<!DOCTYPE html>
<html lang="zxx">
<?php
include 'connection.php';
if (isset($_POST['submit'])){
$studentid = mysqli_real_escape_string($con,$_POST['studentid']);
$password = mysqli_real_escape_string($con,$_POST['password']);
$sql = "SELECT * FROM users WHERE studentid = '$studentid' AND password = '$password' ";
$query = mysqli_query($con,$sql);
$count = mysqli_num_rows($query);
if ($count > 0){
session_start();
$_SESSION['login'] = $_POST['studentid'];
echo '<div class="alert alert-success wow fadeInLeft delay-03s" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
<strong>Well done!</strong> Login successfull!!
</div>';
echo "<script> location.href='my-profile.php'; </script>";
}
else{
echo '<div class="alert alert-danger wow fadeInRight delay-03s" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
<strong>Oh snap!</strong> Incorrect login details !!
</div>';
}
}
?>
<head>
<title>User Login</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta charset="utf-8">
<!-- External CSS libraries -->
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="css/animate.min.css">
<link rel="stylesheet" type="text/css" href="css/bootstrap-submenu.css">
<link rel="stylesheet" type="text/css" href="css/bootstrap-select.min.css">
<link rel="stylesheet" href="css/leaflet.css" type="text/css">
<link rel="stylesheet" href="css/map.css" type="text/css">
<link rel="stylesheet" type="text/css" href="fonts/font-awesome/css/font-awesome.min.css">
<link rel="stylesheet" type="text/css" href="fonts/flaticon/font/flaticon.css">
<link rel="stylesheet" type="text/css" href="fonts/linearicons/style.css">
<link rel="stylesheet" type="text/css" href="css/jquery.mCustomScrollbar.css">
<link rel="stylesheet" type="text/css" href="css/dropzone.css">
<link rel="stylesheet" type="text/css" href="css/slick.css">
<!-- Custom stylesheet -->
<link rel="stylesheet" type="text/css" href="css/style.css">
<link rel="stylesheet" type="text/css" id="style_sheet" href="css/skins/default.css">
<!-- Favicon icon -->
<link rel="shortcut icon" href="img/favicon.ico" type="image/x-icon" >
<!-- Google fonts -->
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Open+Sans:400,300,600,700,800%7CPlayfair+Display:400,700%7CRoboto:100,300,400,400i,500,700">
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<link rel="stylesheet" type="text/css" href="css/ie10-viewport-bug-workaround.css">
<!-- Just for debugging purposes. Don't actually copy these 2 lines! -->
<!--[if lt IE 9]><script src="js/ie8-responsive-file-warning.js"></script><![endif]-->
<script src="js/ie-emulation-modes-warning.js"></script>
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="js/html5shiv.min.js"></script>
<script src="js/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="page_loader"></div>
<!-- Contact section start -->
<div class="contact-section overview-bgi">
<div class="container">
<div class="row">
<div class="col-lg-12">
<!-- Form content box start -->
<div class="form-content-box">
<!-- Logo -->
<a href="index.html">
<img src="img/logos/logo.png" class="cm-logo" alt="logo">
</a>
<!-- details -->
<div class="details">
<!-- Name -->
<h3>Sign into your account</h3>
<!-- Form start -->
<form action="login.php" method="POST" enctype="multipart/form-data">
<div class="form-group">
<input type="text" name="studentid" class="input-text" placeholder="Student Id">
</div>
<div class="form-group">
<input type="password" name="password" class="input-text" placeholder="Password">
</div>
<div class="checkbox">
<div class="ez-checkbox pull-left">
<label>
<input type="checkbox" class="ez-hide">
Remember me
</label>
</div>
<div class="clearfix"></div>
</div>
<div class="form-group mb-0">
<button type="submit" name = "submit" class="btn-md button-theme btn-block">login</button>
</div>
</form>
<!-- Form end -->
</div>
<!-- Footer -->
<div class="footer">
<span>
Don't have an account? <a href="signup.php">Register here</a>
</span>
</div>
</div>
<!-- Form content box end -->
</div>
</div>
</div>
</div>
<!-- Contact section end -->
<!-- Full Page Search -->
<div id="full-page-search">
<button type="button" class="close">×</button>
<form action="http://storage.googleapis.com/themevessel-items/real-house/index.html#">
<input type="search" value="" placeholder="type keyword(s) here" />
<button type="submit" class="btn btn-sm button-theme">Search</button>
</form>
</div>
<script src="js/jquery-2.2.0.min.js"></script>
<script src="js/popper.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/bootstrap-submenu.js"></script>
<script src="js/rangeslider.js"></script>
<script src="js/jquery.mb.YTPlayer.js"></script>
<script src="js/wow.min.js"></script>
<script src="js/bootstrap-select.min.js"></script>
<script src="js/jquery.easing.1.3.js"></script>
<script src="js/jquery.scrollUp.js"></script>
<script src="js/jquery.mCustomScrollbar.concat.min.js"></script>
<script src="js/leaflet.js"></script>
<script src="js/leaflet-providers.js"></script>
<script src="js/leaflet.markercluster.js"></script>
<script src="js/dropzone.js"></script>
<script src="js/slick.min.js"></script>
<script src="js/jquery.filterizr.js"></script>
<script src="js/jquery.magnific-popup.min.js"></script>
<script src="js/jquery.countdown.js"></script>
<script src="js/maps.js"></script>
<script src="js/app.js"></script>
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<script src="js/ie10-viewport-bug-workaround.js"></script>
<!-- Custom javascript -->
<script src="js/ie10-viewport-bug-workaround.js"></script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','../../../www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-89110077-3', 'auto');
ga('send', 'pageview');
</script>
</body>
</html>