add backticks
<?php
include 'connection.php';
<pre>
// Assigning Variables
$name = $_POST['name_of_facility'];
$location = $_POST['location'];
$responorg = $_POST['responsible_organisation'];
// Variable that executes request to send data to database
$sql = "INSERT INTO facilities (`name_of_facility`,`location`,`responsible_organisation`)
VALUES('$name','$location','$responorg')";
// Statement stating whether the execution is successful
if (!mysqli_query ($link,$sql)){
die ('Error: ' . mysqli_error($link));
}
else
echo ('Entry successfully submitted');