-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathbook.php
45 lines (38 loc) · 1.22 KB
/
book.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
<html>
<body>
<?php
$con = mysqli_connect("localhost","root","1234","flight db");
if (!$con)
{
die('Could not connect: ' . mysqli_error());
}
$fid=$_POST['password'];
$lname=$_POST['fname'];
$fname=$_POST['lname'];
$sql="INSERT INTO booking (fname, lname, email, seatno, fid, date)
VALUES
('$_POST[fname]','$_POST[lname]','$_POST[mail]','$_POST[age]','$_POST[password]','$_POST[date]')";
$result = mysqli_query($con, "CALL update1($fid);") or die("Query fail :" .mysqli_error());
if (!mysqli_query($con,$sql))
{
die('Error: ' . mysqli_error($con));
}
echo "booked successfully";
mysqli_close($con)
?>
<head>
<title>login</title>
<link rel="stylesheet" href="mystyle.css">
</head>
<body>
<div class="login">
<h1>Enter email id to view ticket</h1>
<form method="post" action="ticket.php">
<input type="email" name="email" id="email" placeholder="email" required="required" />
<!-- <input type="password" name="password" id="password" placeholder="password" required="required" />-->
<button type="submit" class="btn btn-primary btn-block btn-large">Download Ticket</button>
</form>
<a href="book.html"><h1>Book again</h1></a>
</div>
</body> </body>
</html>