if isset PHP not working?
<p>Okay, Im trying to set a captcha up, However with this code in, it breaks.</p>

<pre><code>if(isset($_POST["captcha"]))
    if($_SESSION["captcha"]==$_POST["captcha"])
</code></pre>

<p>When i do it with out it, the page works, but the captcha is letting incorrect submits through.</p>

<blockquote>
  <p>Parse error: syntax error, unexpected '"', expecting T_STRING or T_VARIABLE or T_NUM_STRING in /hermes/waloraweb085/b2027/moo.lutarinet/jointest.php on line 71</p>
</blockquote>

<pre><code>&lt;?php

$pagetitle = "Home";

$checkrank = 0;

include ($_SERVER['DOCUMENT_ROOT'].'/header.inc.php');

ECHO &lt;&lt;&lt;END

&lt;br&gt;&lt;br&gt;

&lt;b&gt;&lt;center&gt;&lt;i&gt;&lt;u&gt;DO NOT&lt;/u&gt; USE YOUR NEOPETS PASSWORD OR PIN NUMBER!!!&lt;/b&gt;&lt;/i&gt;&lt;/center&gt;
&lt;p&gt;
?&gt;


&lt;?php session_start() ?&gt; 
&lt;center&gt;&lt;P&gt;&lt;FORM ACTION="join.pro.php" enctype="multipart/form-data" METHOD=POST&gt;
   &lt;table width="393" height="188" border="0" cellpadding="0" cellspacing="0"&gt;
       &lt;td width="150"&gt;Username&lt;/td&gt;
       &lt;td width="243"&gt;&lt;input type=text name="name" value="" size=32 maxlength=15&gt;&lt;/td&gt;
     &lt;/tr&gt;
     &lt;tr&gt;
       &lt;td&gt;Password&lt;/td&gt;
       &lt;td&gt;&lt;input type=password name="pass1" VALUE="" maxlength=15&gt;&lt;/td&gt;
     &lt;/tr&gt;
     &lt;tr&gt;
       &lt;td&gt;Confirm Password&lt;/td&gt;
       &lt;td&gt;&lt;input type=password name="pass2" VALUE="" size=32 maxlength=15&gt;&lt;/td&gt;
     &lt;/tr&gt;
     &lt;tr&gt;
       &lt;td&gt;Security Code (4 Diget Number)&lt;/td&gt;
       &lt;td&gt;&lt;input type=password name="security" VALUE="" size=32 maxlength=4&gt;&lt;/td&gt;
     &lt;/tr&gt;
     &lt;tr&gt;
       &lt;td&gt;Email Address&lt;/td&gt;
       &lt;td&gt;&lt;INPUT TYPE=text NAME="email" VALUE="" SIZE=32 maxlength=100&gt;&lt;/td&gt;
     &lt;/tr&gt;
     &lt;tr&gt;
       &lt;td height="41" colspan="2" valign="middle"&gt;&lt;p&gt;&lt;p&gt;&lt;center&gt;
         By registering an account here you agree to all

         of our &lt;A HREF="$baseurl/tos.php"&gt;Terms and

       Conditions&lt;/A&gt;. You can also view our &lt;A HREF="$baseurl/privacy.php"&gt;Privacy

   Policy&lt;/A&gt;. 
       &lt;/center&gt;&lt;/p&gt;&lt;/td&gt;
     &lt;/tr&gt;

&lt;tr&gt;&lt;td align="center"&gt;CAPTCHA:&lt;br&gt;
    (antispam code, 3 black symbols)&lt;br&gt;
    &lt;table&gt;&lt;tr&gt;&lt;td&gt;&lt;img src="captcha.php" alt="captcha image"&gt;&lt;/td&gt;&lt;td&gt;&lt;input type="text" name="captcha" size="3" maxlength="3"&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;td height="27" colspan="2" valign="middle"&gt;
         &lt;center&gt;&lt;input type=submit name=Submit value="Register"&gt;&lt;/center&gt;
       &lt;/td&gt;
&lt;/table&gt;
&lt;/form&gt;
&lt;?php
if(isset($_POST["captcha"]))
if($_SESSION["captcha"]==$_POST["captcha"])
{
    //CAPTHCA is valid; proceed the message: save to database, send by e-mail ...
    echo 'CAPTHCA is valid; proceed the message';
}
else
{
    echo 'CAPTHCA is not valid; ignore submission';
}
?&gt;


&lt;?php



END;




include ($_SERVER['DOCUMENT_ROOT'].'/footer.inc.php');


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

<p>captcha.php</p>

<pre><code>&lt;?php
session_start();
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); 
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); 
header("Cache-Control: no-store, no-cache, must-revalidate"); 
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache"); 

function _generateRandom($length=6)
{
    $_rand_src = array(
        array(48,57) //digits
        , array(97,122) //lowercase chars
//      , array(65,90) //uppercase chars
    );
    srand ((double) microtime() * 1000000);
    $random_string = "";
    for($i=0;$i&lt;$length;$i++){
        $i1=rand(0,sizeof($_rand_src)-1);
        $random_string .= chr(rand($_rand_src[$i1][0],$_rand_src[$i1][1]));
    }
    return $random_string;
}

$im = @imagecreatefromjpeg("http://sketchedneo.com/images/sitedesigns/captcha.jpg"); 
$rand = _generateRandom(3);
$_SESSION['captcha'] = $rand;
ImageString($im, 5, 2, 2, $rand[0]." ".$rand[1]." ".$rand[2]." ", ImageColorAllocate ($im, 0, 0, 0));
$rand = _generateRandom(3);
ImageString($im, 5, 2, 2, " ".$rand[0]." ".$rand[1]." ".$rand[2], ImageColorAllocate ($im, 255, 0, 0));
Header ('Content-type: image/jpeg');
imagejpeg($im,NULL,100);
ImageDestroy($im);
?&gt;
</code></pre>

<p>Help please anyone?</p>

<p>Line 71:  if(isset($_POST["captcha"]))</p>

<p>Line 72: if($_SESSION["captcha"]==$_POST["captcha"])</p>
