-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathindex.php
122 lines (93 loc) · 3.66 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
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
<!DOCTYPE html>
<html lang="en">
<head>
<title>CAR RENTAL</title>
<script type="text/javascript">
window.history.forward();
function noBack() {
window.history.forward();
}
</script>
<link rel="stylesheet" href="css/style.css">
<script type="text/javascript">
function preventBack() {
window.history.forward();
}
setTimeout("preventBack()", 0);
window.onunload = function () { null };
</script>
</head>
<body>
<?php
require_once('connection.php');
if(isset($_POST['login']))
{
$email=$_POST['email'];
$pass=$_POST['pass'];
if(empty($email)|| empty($pass))
{
echo '<script>alert("please fill the blanks")</script>';
}
else{
$query="select *from users where EMAIL='$email'";
$res=mysqli_query($con,$query);
if($row=mysqli_fetch_assoc($res)){
$db_password = $row['PASSWORD'];
if(md5($pass) == $db_password)
{
header("location: cardetails.php");
session_start();
$_SESSION['email'] = $email;
}
else{
echo '<script>alert("Enter a proper password")</script>';
}
}
else{
echo '<script>alert("enter a proper email")</script>';
}
}
}
?>
<div class="hai">
<div class="navbar">
<div class="icon">
<h2 class="logo">CaRs</h2>
</div>
<div class="menu">
<ul>
<li><a href="#">HOME</a></li>
<li><a href="aboutus.html">ABOUT</a></li>
<li><a href="#">SERVICES</a></li>
<li><a href="contactus.html">CONTACT</a></li>
<li> <button class="adminbtn"><a href="adminlogin.php">ADMIN LOGIN</a></button></li>
</ul>
</div>
</div>
<div class="content">
<h1>Rent Your <br><span>Dream Car</span></h1>
<p class="par">Live the life of Luxury.<br>
Just rent a car of your wish from our vast collection.<br>Enjoy every moment with your family<br>
Join us to make this family vast. </p>
<button class="cn"><a href="register.php">JOIN US</a></button>
<div class="form">
<h2>Login Here</h2>
<form method="POST">
<input type="email" name="email" placeholder="Enter Email Here">
<input type="password" name="pass" placeholder="Enter Password Here">
<input class="btnn" type="submit" value="Login" name="login"></input>
</form>
<p class="link">Don't have an account?<br>
<a href="register.php">Sign up</a> here</a></p>
<!-- <p class="liw">or<br>Log in with</p>
<div class="icon">
    <a href="https://www.facebook.com/"><ion-icon name="logo-facebook"></ion-icon> </a>
<a href="https://www.instagram.com/"><ion-icon name="logo-instagram"></ion-icon> </a> 
<a href="https://myaccount.google.com/"><ion-icon name="logo-google"></ion-icon> </a> 
</div> -->
</div>
</div>
</div>
<script src="https://unpkg.com/[email protected]/dist/ionicons.js"></script>
</body>
</html>