-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcustomer_input.php
45 lines (36 loc) · 1.26 KB
/
customer_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
42
43
44
45
<?php
$server = "localhost";
$user = "root";
$password = "";
$dbname = "bikerental1";
$con = mysqli_connect($server, $user, $password, $dbname)or die("connection failed");
$Dl_number=mysqli_real_escape_string($con,$_REQUEST['Dl_number']);
$Fname=mysqli_real_escape_string($con,$_REQUEST['Fname']);
$Mname=mysqli_real_escape_string($con,$_REQUEST['Mname']);
$Lname=mysqli_real_escape_string($con,$_REQUEST['Lname']);
$Phone_no=mysqli_real_escape_string($con,$_REQUEST['Phone_no']);
$email=mysqli_real_escape_string($con,$_REQUEST['email']);
$Street=mysqli_real_escape_string($con,$_REQUEST['Street']);
$city=mysqli_real_escape_string($con,$_REQUEST['city']);
$state=mysqli_real_escape_string($con,$_REQUEST['State']);
$Zipcode=mysqli_real_escape_string($con,$_REQUEST['Zipcode']);
$sql= "INSERT INTO customer_details (DL_number,Fname,Mname,Lname,Phone_number,email,Street,city,State_name,zipcode)
VALUES('$Dl_number','$Fname','$Mname','$Lname','$Phone_no','$email','$Street','$city','$state','$Zipcode')";
if(mysqli_query($con,$sql))
{
}
else
{
echo " error:could not ableto execute $sql." .mysqli_error($con);
}
?>
<html>
<head>
</head>
<body>
<script>
alert("details uploded successfully");
window.location.href="booking.php";
</script>
</body>
</html>