<?php //Booking Request index file that sends data from the form to the database include 'connection.php'; // Assigning Variables $evename = $_POST['event_name']; $evedescrip = $_POST['event_description']; $evetype = $_POST['event_type']; $fac = $_POST['name_of_facility']; $startdate = $_POST['event_start_date_time']; $enddate = $_POST['event_end_date_time']; $evecood = $_POST['event_coordinator']; $bookdate = date('d-m-y'); // Variable that executes request to send data to database $sql = "INSERT INTO booking_requests (`event_name`,`event_description`,`event_type`, `name_of_facility`,`event_start_date_time`,`event_end_date_time`,`event_coordinator`,`booking_request_date`) VALUES('$evename','$evedescrip','$evetype','$fac','$startdate','$enddate','$evecood',$bookdate)"; // Statement stating whether the execution is successful if (!mysqli_query ($link,$sql)){ die ('Error: ' . mysqli_error($link)); } else echo ('Entry successfully submitted'); ?>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)