forked from Tiwinkumar/Ecom_front
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbook.php
More file actions
25 lines (16 loc) · 721 Bytes
/
Copy pathbook.php
File metadata and controls
25 lines (16 loc) · 721 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
// Create database connection
$db = mysqli_connect("localhost", "root", "", "food");
// Initialize message variable
$msg = "";
if (isset($_POST['submit'])) {
$name = mysqli_real_escape_string($db, $_POST['name']);
$email = mysqli_real_escape_string($db, $_POST['email']);
$phone = mysqli_real_escape_string($db, $_POST['phone']);
$datebook = mysqli_real_escape_string($db, $_POST['datebook']);
$attendents = mysqli_real_escape_string($db, $_POST['attendents']);
$sql = "INSERT INTO tablebook (name,email,mobile,datebook,attendees) VALUES ('$name', '$email', '$phone', '$datebook', '$attendents')";
header("Location: book-a-table.php");
mysqli_query($db, $sql);
}
?>