-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbooking_input.php
41 lines (28 loc) · 893 Bytes
/
booking_input.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
<?php
$server = "localhost";
$user = "root";
$password = "";
$dbname = "bikerental1";
$con = mysqli_connect($server, $user, $password, $dbname)or die("connection failed");
$from_date=mysqli_real_escape_string($con,$_REQUEST['from_date']);
$to_date=mysqli_real_escape_string($con,$_REQUEST['to_date']);
$BOOKING_ID=mysqli_real_escape_string($con,$_REQUEST['BOOKING_ID']);
$REG_NUM=mysqli_real_escape_string($con,$_REQUEST['REG_NUM']);
$DL_NUM=mysqli_real_escape_string($con,$_REQUEST['DL_NUM']);
$sql= "INSERT INTO booking_details (BOOKING_ID,FROM_DT_TIME,RET_DT_TIME,AMOUNT,REG_NUM,DL_NUM)
VALUES('$BOOKING_ID','$from_date','$to_date','','$REG_NUM','$DL_NUM')";
if(mysqli_query($con,$sql))
{
header("location:booking1.php");
}
else
{
echo " error:could not ableto execute $sql." .mysqli_error($con);
}
?>
<html>
<head>
</head>
<body>
</body>
</html>