forked from krishheii/Busreservation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
67 lines (44 loc) · 1.89 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
<html >
<head>
<meta charset="UTF-8">
<title>Rit Bus Reservation</title>
<meta name="viewport" content="width=device-width, initial-scale=1"><link href='https://fonts.googleapis.com/css?family=Roboto:400,700' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css" integrity="sha384-rwoIResjU2yc3z8GV/NPeZWAv56rSmLldC3R/AZzGRnGxQQKnKkoFVhFQhNUwEyJ" crossorigin="anonymous">
<link rel="stylesheet" href="css/style.css">
<style> .po{margin-top: -50px;}</style>
</head>
<body>
<div class="user">
<header class="user__header">
<img src="rit.png" alt="" />
<h1 class="user__title">Rajiv Gandhi Institute of Technology, Kottayam</h1>
</header>
<form class="form" method="POST" >
<div class="form__group">
<input type="text" placeholder="Username" class="form__input" name="username" />
</div>
<div class="form__group">
<input type="password" placeholder="Password" class="form__input" name="pass" />
</div>
<button class="btn" type="submit">Login</button>
</form>
</div>
</div>
<script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
<script src="js/index.js"></script>
</body>
</html>
<?php
ob_start();
$error="";
if($_POST){
if($_POST['username']=='neha'&&$_POST['pass']=='krish'){
echo "<script type='text/javascript'>window.top.location='Home.php';</script>"; exit;
}
else
{
echo '<div class="user"><div class="alert alert-danger po" role="alert" ><strong>Oh Wrong Information!</strong>CouldYou Please Try Again</div>';
}
}
?>