fixing the parse error in php
<p>how can i correct this error i am getting when i try to load my page,</p>

<pre><code>Parse error: syntax error, unexpected $end in C:\xampp\htdocs\mysite\index.php on line 46
</code></pre>

<p>the code on line 46 is this one below</p>

<pre><code>?&gt;
</code></pre>

<p>and my code is this one</p>

<pre><code>&lt;?php session_start();?&gt;

&lt;!DOCTYPE html&gt;
&lt;html lang="en"&gt;
&lt;?php
if (isset ($_post['submit'])){
    $error_count = 0;
    $error_message = array();
//trim removes the spaces
  $validate = trim(strtolower($_post['validate']));
  if($validate != get_answer() ){ 
  $error_count++;
  $error_message['validate'] = "validation error";
   }  
 echo $error_count;
if( $error_count &gt; 0){
?&gt;
&lt;form method="post"&gt;
&lt;h1&gt; &lt;?php create_function()?&gt;&lt;/h1&gt;
&lt;label for="validation"&gt;Validate:&lt;/label&gt;
&lt;input type="text" name="validate" id="validate" /&gt;
&lt;?php if(isset($error_message['validate'])):?&gt;
&lt;span style="color: red"&gt;&lt;?php echo $error_message['validate']?&gt;&lt;/span&gt;
&lt;?php endif;?&gt;
&lt;span style="color: green"&gt;Reenter Answer to Question&lt;/span&gt;
&lt;br/&gt;
&lt;input type="submit" name="submit" value="email"&gt;
&lt;/form&gt;
&lt;?php
}
else{
?&gt;
&lt;form method="post"&gt;
&lt;h1&gt; &lt;?php create_function()?&gt;&lt;/h1&gt;
&lt;label for="validation"&gt;Validate:&lt;/label&gt;
&lt;input type="text" name="validate" id="validate" /&gt;
&lt;br/&gt;
&lt;input type="submit" name="submit" value="email"&gt;
&lt;/form&gt;
&lt;?php
}
?&gt;
</code></pre>

<p>what exactly am i doing wrong? and how can i fix it?</p>
