Below is my php booking page . I have trouble solving the error. I faced in check booking page below. I can't find the undefined index error for service, eventdate, Customer ID. Can you help me?
<?php
session_start();
if(!isset($_SESSION['MM_Username']))
{
header("Location:login.php");
}
$un = $_SESSION["MM_Username"];
$conn = mysqli_connect("localhost", "root", "" , "m3_162931g_db");
$sql = "SELECT * from customer where Username='$un'";
$user = mysqli_query($conn, $sql);
$oneUser = mysqli_fetch_assoc($user);
?>
<content>
<h1>Booking Page</h1>
<form action="checkbook.php" method="post" style="border:1px solid #ccc">
<div class="container">
<label><b>Services :</b></label>
<select name ="service" placeholder="Select Service">
<option value="1" >Wedding</option>
<option value="2" >Same Day Printing</option>
<option value="3" >Instagram Images</option>
<option value="4" >Family Photo</option>
<option value="5" >Green Screen Photography</option>
<option value="6" >Corporate Event</option>
<option value="7" >Business Portrait</option>
<option value="8" >Advertisment Printing</option>
<option value="9" >Award Ceremonies</option>
</select>
<br>
<label><b>Date :</b></label>
<input type="date" name="eventdate" required>
<input type="text" id="hide" name="CustomerID" value="<?php echo
$oneUser['CustomerID']; ?>" hidden="hidden" >
<div class="clearfix">
<button type="reset" class="cancelbtn">Cancel</button>
<button type="submit" class="signupbtn">Book</button>
</div>
</div>
</form>
this is my checkbook php page .Its shows undefined index error for service ,eventdate, customerID
<?php
session_start();
$service = $_POST['service'];
$eventdate = $_POST['eventdate'];
$customerID = $_POST['CustomerID'];
$bs = "B";
$conn = mysqli_connect("localhost", "root", "" , "m3_162931G_db");
$sql = "insert into booking(ProductID,CustomerID,Booking_Date,status)
values ('$service','$customerID','$eventdate', '$bs')";
$result = mysqli_query($conn,$sql);
if ($result){
header("Location:orderhistory.php");
}
?>