-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbook_form.php
More file actions
25 lines (19 loc) · 753 Bytes
/
book_form.php
File metadata and controls
25 lines (19 loc) · 753 Bytes
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
<?php
$connection = mysqli_connect('localhost','root','','book_db');
if(isset($_POST['send'])){
$name = $_POST['name'];
$email = $_POST['email'];
$phone = $_POST['phone'];
$address = $_POST['address'];
$location = $_POST['location'];
$guests = $_POST['guests'];
$arrivals = $_POST['arrivals'];
$leaving = $_POST['leaving'];
$request = "insert into book_form (name,email,phone,address,location,guests,arrivals,leaving) values
('$name','$email','$phone','$address','$location','$guests','$arrivals','$leaving')";
mysqli_query($connection, $request);
header('location:book.php');
}else{
echo 'something went wrong try again';
}
?>