Parse Error in PhP Program : <p>I am trying to make a webpage that will take user input and add it to a .txt file. It is supposed to work like this webpage <a href="http://150.216.54.86:808/homework8/AirlineSurvey.html" rel="nofollow noreferrer">http://150.216.54.86:808/homework8/AirlineSurvey.html</a>
Why am I receiving "Parse error: syntax error, unexpected ';'" on line 27?</p>

<pre><code>&lt;?php
$WaitTime = addslashes($_POST["wait_time"]);
$Friendliness = addslashes($_POST["friendliness"]); //missing );
$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))
    echo "&lt;hr /&gt;&lt;p&gt;You must enter a value in each field. Click
     your browser's Back button to return to the form.&lt;/p&gt;&lt;hr /&gt;";
else {
        $Entry = $WaitTime . "\n";
        $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) &gt; 0) {
                        echo "&lt;p&gt;The entry has been successfully added.&lt;/p&gt;";
                        flock($SurveyFile, LOCK_UN;
                        fclose($SurveyFile);
                else
                        echo "&lt;p&gt;The entry could not be saved!&lt;/p&gt;";
            }
        } else
                echo "&lt;p&gt;The entry could not be saved!&lt;/p&gt;";
    }
            empty($Noise))
    echo "&lt;hr /&gt;&lt;p&gt;You must enter a value in each field. Click
     your browser's Back button to return to the form.&lt;/p&gt;&lt;hr /&gt;";
else {
        $Entry = $WaitTime . "\n";
        $Entry .= $Friendliness . "\n";
        $Entry .= $Space . "\n";
        $Entry .= $Comfort . "\n";
        $Entry .= $Cleanliness . "\n";
        $Entry .= $Noise . "\n";
        $SurveyFile = fopen("survey.txt", "w"); //missing ;
//missing }
        }
        if (flock($SurveyFile, LOCK_EX)) {
                if (fwrite($SurveyFile, $Entry) &gt; 0) {
                        echo "&lt;p&gt;The entry has been successfully added.&lt;/p&gt;";
                        flock($SurveyFile, LOCK_UN;
                        fclose($SurveyFile);

                else
                        echo "&lt;p&gt;The entry could not be saved!&lt;/p&gt;";
        }
        else {
                echo "&lt;p&gt;The entry could not be saved!&lt;/p&gt;";
    }
}
</code></pre>

<p>?></p>
