unexpected t_if on line 34
<pre><code>&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
    &lt;link href="aadab.css" rel="stylesheet" type="text/css"&gt;
    &lt;link rel="icon" href="images/favicon.png"&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;h2&gt;REGISTRATION FORM&lt;/h2&gt;
&lt;div id="form"&gt;


  &lt;?php
    if(isset($_POST['submit']))
        {
            $name= stripslashes($_POST['name']);
            $phone= stripslashes($_POST['phone']);
            $email= stripslashes($_POST['email']);
            $college= stripslashes($_POST['namecolg']);
            $team= stripslashes($_POST['team']);
            $im= stripslashes($_POST['im']);
            $events= stripslashes($_POST['eventopts']);
            $detail= stripslashes($_POST['detail']);
            $subject= 'Registration for aadab 2013';
            $output_form= false

            if ( (empty($name)) || (empty($phone)) || (empty($email)) || (empty($college)) || (empty($events)) || (empty($detail)) )
                {
                    echo '&lt;p id="fillall"&gt;It is necessary that you fill at least the required fields that are marked with a star&lt;/p&gt;';
                    $output_form= true;
                }
            else
                {
                    $to= "xyz@yahoo.in, $email";
                    $msg="Registration Detail: \n\n"."Name: $name \n"."Contact: $phone \n"."Email: $email \n"."College: $namecolg \n"."Team(if any): $team \n"."Instant message: $im \n"."Event(s) registered for: $team \n"."Details of the event(s): $team \n";

                    mail($to, $subject, $msg)
                    echo 'Congratulations! You have successfully registered! You have been sent a confirmatory email.';
                }
        }
    else
        {?&gt;
    &lt;form action="&lt;?php echo $_SERVER['PHP_SELF'] ?&gt;" autocomplete="on"&gt;
        &lt;table&gt;
            &lt;tr&gt;
                &lt;th&gt;&lt;label for="name"&gt;Your fullname*&lt;/label&gt;&lt;/th&gt;
                &lt;td&gt;&lt;input type="text" id="name" name="name" value="&lt;?php echo $name ?&gt;" required&gt;&lt;/td&gt;
            &lt;/tr&gt;

            &lt;tr&gt;
                &lt;th&gt;&lt;label for="phone"&gt;Your contact number*&lt;/label&gt;&lt;/th&gt;
                &lt;td&gt;&lt;input type="tel" id="phone" name="phone" value="&lt;?php echo $phone ?&gt;" required&gt;&lt;/td&gt;
            &lt;/tr&gt;

            &lt;tr&gt;
                &lt;th&gt;&lt;label for="email"&gt;Your email-id*&lt;/label&gt;&lt;/th&gt;
                &lt;td&gt;&lt;input type="email" id="email" name="email" value="&lt;?php echo $email ?&gt;" required&gt;&lt;/td&gt;
            &lt;/tr&gt;

            &lt;tr&gt;
                &lt;th&gt;&lt;label for="namecolg"&gt;Name of your college*&lt;/label&gt;&lt;/th&gt;
                &lt;td&gt;&lt;input type="text" id="namecolg" name="namecolg" value="&lt;?php echo $college ?&gt;" required&gt;&lt;/td&gt;
            &lt;/tr&gt;

            &lt;tr&gt;
                &lt;th&gt;&lt;label for="team"&gt;The name of your team&lt;br&gt;(if registering for a team event)&lt;/label&gt;&lt;/th&gt;
                &lt;td&gt;&lt;input type="text" id="team" name="team" value="&lt;?php echo $team ?&gt;" &gt;&lt;/td&gt;
            &lt;/tr&gt;

            &lt;tr&gt;
                &lt;th&gt;&lt;label for="im"&gt;Bbm pin/iMessage id/Whatsapp&lt;br&gt;(if any, separate each id by a comma)&lt;/label&gt;&lt;/th&gt;
                &lt;td&gt;&lt;input type="text" id="im" name="im" value="&lt;?php echo $im ?&gt;" &gt;&lt;/td&gt;
            &lt;/tr&gt;

            &lt;tr&gt;
                &lt;th&gt;Event(s) you would like to register for*&lt;/th&gt;
                &lt;td&gt;
                &lt;input type="checkbox" name="eventopts" value="Literary"&gt;&lt;span style="color: #DBDBDB;"&gt;Literary Event&lt;br&gt;
                &lt;input type="checkbox" name="eventopts" value="Art"&gt;Art Event&lt;br&gt;
                &lt;input type="checkbox" name="eventopts" value="Cultural"&gt;Cultural Event&lt;/span&gt;
                &lt;/td&gt;
            &lt;/tr&gt;

            &lt;tr&gt;
                &lt;th&gt;&lt;label for="detail"&gt;Details of the event(s) you want to register for*&lt;/label&gt;&lt;/th&gt;
                &lt;td&gt;&lt;input type="text" id="detail" name="detail" value="&lt;?php echo $detail ?&gt;" required&gt;&lt;/td&gt;
            &lt;/tr&gt;

            &lt;tr&gt;&lt;td colspan="2" style="text-align: center; padding: 40px 0px 0px 0px;"&gt;&lt;input type="submit" value="Register"&gt;&lt;/td&lt;/tr&gt;
        &lt;/table&gt;
    &lt;/form&gt;
    &lt;?php } ?&gt;
    &lt;/div&gt;
    &lt;/body&gt;
    &lt;/html&gt;
</code></pre>

<p>why am i getting an unexpected t_if on line 34? i tried every yhing but nothing has helped so far </p>
