-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaccount.php
132 lines (117 loc) · 3.69 KB
/
account.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
<!DOCTYPE html>
<html lang="en">
<head>
<title>Car Rental</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0" />
<link rel="stylesheet" type="text/css" href="css/reset.css">
<link rel="stylesheet" type="text/css" href="css/responsive.css">
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/main.js"></script>
</head>
<body>
<section class="">
<?php
include 'header.php';
?>
<section class="caption">
<h2 class="caption" style="text-align: center">Find You Dream Cars For Hire</h2>
<h3 class="properties" style="text-align: center">Range Rovers - Mercedes Benz - Landcruisers</h3>
</section>
</section><!-- end hero section -->
<section class="search">
<div class="wrapper">
<div id="fom">
<form method="post">
<h3 style="text-align:center; color: #000099; font-weight:bold; text-decoration:underline">Client Login Area</h3>
<table height="100" align="center">
<tr>
<td>Email Address:</td>
<td><input type="email" name="email" placeholder="Enter Email Address" required></td>
</tr>
<tr>
<td>Password:</td>
<td><input type="password" name="pass" placeholder="Enter ID Number" required></td>
</tr>
<tr>
<td><input type="submit" name="log" value="Login Here"></td>
<td style="text-align:right;"><a href="signup.php">Sigup Here</a></td>
</tr>
</table>
</form>
<?php
if(isset($_POST['log'])){
include 'includes/config.php';
$uname = $_POST['email'];
$pass = $_POST['pass'];
$qy = "SELECT * FROM client WHERE email = '$uname' AND id_no = '$pass'";
$log = $conn->query($qy);
$num = $log->num_rows;
$row = $log->fetch_assoc();
if($num > 0){
session_start();
$_SESSION['email'] = $row['email'];
$_SESSION['pass'] = $row['id_no'];
echo "<script type = \"text/javascript\">
alert(\"Login Successful.\");
window.location = (\"index.php\")
</script>";
} else{
echo "<script type = \"text/javascript\">
alert(\"Login Failed. Try Again\");
window.location = (\"account.php\")
</script>";
}
}
?>
</div>
<a href="#" class="advanced_search_icon" id="advanced_search_btn"></a>
</div>
</section><!-- end search section -->
<footer>
<div class="wrapper footer">
<ul>
<li class="links">
<ul>
<li>OUR COMPANY</li>
<li><a href="#">About Us</a></li>
<li><a href="#">Terms</a></li>
<li><a href="#">Policy</a></li>
<li><a href="#">Contact</a></li>
</ul>
</li>
<li class="links">
<ul>
<li>OTHERS</li>
<li><a href="#">...</a></li>
<li><a href="#">...</a></li>
<li><a href="#">...</a></li>
<li><a href="#">...</a></li>
</ul>
</li>
<li class="links">
<ul>
<li>OUR CAR TYPES</li>
<li><a href="#">Mercedes</a></li>
<li><a href="#">Range Rover</a></li>
<li><a href="#">Landcruisers</a></li>
<li><a href="#">Others.</a></li>
</ul>
</li>
<li class="about">
<p>Our company rents cars and other vehicles to clients at lower costs.</p>
<ul>
<li><a href="http://facebook.com/" class="facebook" target="_blank"></a></li>
<li><a href="http://twitter.com/" class="twitter" target="_blank"></a></li>
<li><a href="http://plus.google.com/" class="google" target="_blank"></a></li>
<li><a href="#" class="skype"></a></li>
</ul>
</li>
</ul>
</div>
<div class="copyrights wrapper">
Copyright © <?php echo date("Y")?> Simple Car Rental System
</div>
</footer><!-- end footer -->
</body>
</html>