submit on correctly entered captcha
<p>I have the following page with an option box, when the user selects the following options and then clicks submit, it takes them to the relevant url. However the user must type the correct string in the box which matches a simple static captcha image which is on the screen.</p>

<p>Currently the  code looks like this, however i need help setting the condition so that "abcdef" must be typed in the box before it is submitted otherwise giving an error.</p>

<pre><code>&lt;?php
// Check to see if the form has been submitted.
if(isset($_POST['menu1'])) {
  // If the form has been submitted, force a re-direct to the choice selected.
  header('Location: ' . $_POST['menu1']);
}
?&gt;




&lt;div style="padding-left: 50px"&gt;
&lt;p class="arial"&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;form method="post"&gt; 
&lt;table class="freecontact2form" border="0" width="400px"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td colspan="2"&gt;&lt;span style="font-size: x-small;"&gt; &lt;/span&gt; &lt;font color=#000000 &gt;&lt;/font&gt;
  &lt;br /&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td valign="top"&gt;&lt;table width="400px" class="freecontact2form"&gt;
    &lt;tr&gt;
      &lt;td colspan="2"&gt;&lt;br /&gt;
        &lt;br /&gt;
        &lt;div class="freecontact2formmessage"&gt; &lt;/div&gt;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td valign="top"&gt;&lt;label for="menu1" &gt;These are the following options:&lt;span     class="required_star"&gt; &lt;/span&gt;&lt;/label&gt;&lt;/td&gt;
      &lt;td valign="top"&gt;&lt;select name="menu1" id="menu1"&gt;
        &lt;option selected="selected" value ="http://www.google.com"&gt;Google &lt;/option&gt;
        &lt;option value ="www.msn.com"&gt;MSN&lt;/option&gt;
        &lt;option value ="www.youtube.com"&gt;Youtube&lt;/option&gt;
        &lt;option value ="bing.com"&gt;Bing&lt;/option&gt;

      &lt;/select&gt;&lt;/td&gt;
    &lt;/tr&gt;

    &lt;tr&gt;
      &lt;td valign="top"&gt;&lt;label for="captcha" &gt;&lt;span class="required_star"&gt;&lt;/span&gt;&lt;span     class="required_star"&gt;&lt;/span&gt;&lt;/label&gt;&lt;/td&gt;
      &lt;td valign="top"&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;img src="captcha.jpg" /&gt;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;Please enter the characters shown in the CAPTCHA image:&lt;/td&gt;
      &lt;td&gt;&lt;input type="text" name="captcha" id="captcha" value="" size="10" /&gt;
      &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style="text-align:center" colspan="2"&gt;&lt;br /&gt;&lt;br /&gt; 
      &lt;input type="submit" value=" Submit "&gt;

&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/table&gt;&lt;/td&gt;
  &lt;td valign="top"&gt;&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;


&lt;tr&gt;

&lt;/tr&gt;
&lt;tr&gt;

&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/form&gt; &lt;br /&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
</code></pre>
