-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathorder.php
More file actions
182 lines (147 loc) · 5.13 KB
/
Copy pathorder.php
File metadata and controls
182 lines (147 loc) · 5.13 KB
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
177
178
179
180
181
<!-- Navigation bar -->
<?php
session_start();
require_once ('includes/header.php');
?>
<!DOCTYPE html>
<html lang="zxx">
<head>
<meta charset="UTF-8">
<meta name="description" content="EndGam Gaming Magazine Template">
<meta name="keywords" content="endGam,gGaming, magazine, html">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Favicon -->
<link href="img/favicon.ico" rel="shortcut icon"/>
<!-- Google Font -->
<link href="https://fonts.googleapis.com/css?family=Roboto:400,400i,500,500i,700,700i,900,900i" rel="stylesheet">
<!-- Stylesheets -->
<link rel="stylesheet" href="css/bootstrap.min.css"/>
<link rel="stylesheet" href="css/font-awesome.min.css"/>
<link rel="stylesheet" href="css/slicknav.min.css"/>
<link rel="stylesheet" href="css/owl.carousel.min.css"/>
<link rel="stylesheet" href="css/magnific-popup.css"/>
<link rel="stylesheet" href="css/animate.css"/>
<!-- Main Stylesheets -->
<link rel="stylesheet" href="css/style.css"/>
<title>W3.CSS Template</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<section class="contact-page">
<div class="container">
<br/> <br/> <br/>
<center>
<div class="w3-container">
<div id ="haha" class="w3-card-4 w3-dark-white" style="width:40%">
<br/>
<h3 id ="haha" class="w3-center" ><span class="w3-white w3-wide">Login </h3>
<br/><br/>
<div id ="haha" class="w3-container w3-center">
<form action="" method = "post">
<p><input class="w3-input w3-border" type="email" placeholder="Email" name="email" required ></p>
<p><input class="w3-input w3-border" type="password" placeholder="Password" name="password" required ></p>
<p class ="w3-text-red"><b>
<?php
if(isset($_POST["login"])){
if(!empty($_POST['email']) && !empty($_POST['password'])){
$email = $_POST['email'];
$password = $_POST['password'];
$conn = new mysqli('localhost', 'root', '') or die(mysql_error());
$db = mysqli_select_db($conn, "ohnanastore");
$query=mysqli_query($conn, "SELECT * FROM user WHERE email='".$email."' AND password='".$password."'");
$numrows = mysqli_num_rows($query);
if($numrows !=0)
{
while($row = mysqli_fetch_assoc($query))
{
$dbemail = $row['email'];
$dbpassword = $row ['password'];
$dbusername = $row ['name'];
$dbphone = $row ['phone'];
$dbaddress = $row ['address'];
$dbid = $row ['id'];
}
if($email == $dbemail && $password == $dbpassword)
{
$_SESSION['sess_email']= $email;
$_SESSION['username'] = $dbusername;
$_SESSION['phone'] = $dbphone;
$_SESSION['address'] = $dbaddress;
$_SESSION['id'] = $dbid;
?>
<script>
window.location.href = 'delivery.php';
</script>
<?php
}
}
else
{
echo "Invalid email or password";
}
}
else
{
echo"Required ALL fields";
}
}
?></b></p>
<p><button class="w3-button w3-black w3-center w3-third" type="submit" value="Submit" name="login" > Login </button></p><br/><br/>
<hr>
</form>
<div class="w3-section w3-center">
<form action="register.php">
<button class="w3-button w3-round w3-block w3-left-align " type="submit" value="Submit" name="signup" >
<center><p style="color:black">I'm a new customer</p><p style="color:black"><b> Sign up </b></p></center> </button>
</form>
</div>
</div>
</div>
</div>
</center>
</section>
<!-- <style>
body {
background-image: url("Picture/wall5.jpeg");
background-attachment: fixed;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
}
</style> -->
<footer class="footer-section">
<div class="container">
</a>
<ul class="main-menu footer-menu">
<li><a href="">Home</a></li>
<li><a href="">Games</a></li>
<li><a href="">Reviews</a></li>
<li><a href="">News</a></li>
<li><a href="">Contact</a></li>
</ul>
<div class="footer-social d-flex justify-content-center">
<a href="#"><i class="fa fa-pinterest"></i></a>
<a href="#"><i class="fa fa-facebook"></i></a>
<a href="#"><i class="fa fa-twitter"></i></a>
<a href="#"><i class="fa fa-dribbble"></i></a>
<a href="#"><i class="fa fa-behance"></i></a>
</div>
<div class="copyright"><a href="">Colorlib</a> 2018 @ All rights reserved</div>
</div>
</footer>
<!--====== Javascripts & Jquery ======-->
<script src="js/jquery-3.2.1.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.slicknav.min.js"></script>
<script src="js/owl.carousel.min.js"></script>
<script src="js/jquery.sticky-sidebar.min.js"></script>
<script src="js/jquery.magnific-popup.min.js"></script>
<script src="js/main.js"></script>
</body>
<style>
#haha{
background: #ffffff;
}
</style>
}