I have to find all the syntax errors in this php file, any help is appreciated
<?php
$WaitTime = addslashes($_POST['wait_time']);
$Friendliness = addslashes($_POST['friendliness']); //missing ) and ;
$Space = addslashes($_POST['space']);
$Comfort = addslashes($_POST['comfort']); //missing $
$Cleanliness = addslashes($_POST['cleanliness']);
$Noise = addslashes($_POST['noise']);
if (empty($WaitTime) ||
empty($Friendliness) ||
empty($Space) ||
empty($Comfort) ||
empty($Cleanliness) ||
empty($Noise) //too many ))
echo "<p>You must enter a value in each field. Click
your browser's Back button to return to the form.</p>"; // no hr needed
else {
$Entry .= $WaitTime . "\n"; //no .
$Entry .= $Friendliness . "\n";
$Entry .= $Space . "\n";
$Entry .= $Comfort . "\n";
$Entry .= $Cleanliness . "\n";
$Entry .= $Noise . "\n";
$SurveyFile = fopen("survey.txt", "w"); //missing ;
if (flock($SurveyFile, LOCK_EX)) {
if (fwrite($SurveyFile, $Entry) > 0) {
echo "<p>The entry has been successfully added.</p>";
flock($SurveyFile, LOCK_UN) //missing )
fclose($SurveyFile);
}
else
echo "<p>The entry could not be saved!</p>";
}
?>