-
Notifications
You must be signed in to change notification settings - Fork 31
Expand file tree
/
Copy pathprocess.php
More file actions
27 lines (21 loc) · 746 Bytes
/
Copy pathprocess.php
File metadata and controls
27 lines (21 loc) · 746 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
26
27
<?php include 'database.php'; ?>
<?php
// create a variable
$first_name=$_POST['first_name'];
$last_name=$_POST['last_name'];
$room=$_POST['room'];
$duration=$_POST['duration'];
$email=$_POST['email'];
//Execute the query
mysqli_query($connect,"INSERT INTO employees1 (first_name,last_name,room,duration,email)
VALUES ('$first_name','$last_name','$room','$duration','$email')");
if(mysqli_affected_rows($connect) > 0){
echo"<h1> Thank You!!!</h1>";
echo "$last_name";
echo "<p>Your room is booked</p>";
echo"<br><br>You are being redirected to home page.....";
echo '<a href="index.html">Click here</a>';
} else {
echo "your room is not booked<br />";
echo mysqli_error ($connect);
}