problem with captchas code
<p>Below is the code for the signup.php &amp; captchas.php</p>

<p>If i enter wrong verification code. this code takes me to next page. which i dont want to happen. thats means i enter wrong verification code i shouldn't go to next page. Can any one tell me how to do that.</p>

<p><strong>SIGNUP.PHP</strong></p>

<pre><code>&lt;table width="450" border="0" align="center" cellpadding="0" cellspacing="0"&gt;
&lt;tr&gt;
&lt;td&gt;&lt;form name="form1" method="post" action="signup_ac.php"&gt;
&lt;table width="100%" border="0" cellspacing="4" cellpadding="0"&gt;
&lt;tr&gt;
&lt;td colspan="3"&gt;&lt;strong&gt;Sign Up&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="75"&gt;Name&lt;/td&gt;
&lt;td width="3"&gt;:&lt;/td&gt;
&lt;td width="305"&gt;&lt;input name="name" type="text" id="name" size="30"&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;E-mail&lt;/td&gt;
&lt;td&gt;:&lt;/td&gt;
&lt;td&gt;&lt;input name="email" type="text" id="email" size="30"&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Password&lt;/td&gt;
&lt;td&gt;:&lt;/td&gt;
&lt;td&gt;&lt;input name="password" type="password" id="password" size="30"&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Country&lt;/td&gt;
&lt;td&gt;:&lt;/td&gt;
&lt;td&gt;&lt;input name="country" type="text" id="country" size="30"&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Verification Code&lt;/td&gt;
&lt;td&gt;:&lt;/td&gt;
&lt;td&gt;&lt;input name="Verification Code" type="text" id="Verification Code" size="30"&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;img src="captchas.php"&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;td&gt;&lt;input type="submit" name="Submit" value="Submit"&gt; &amp;nbsp;
&lt;input type="reset" name="Reset" value="Reset"&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;/form&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
</code></pre>

<p><strong>CAPTCHAS.PHP</strong></p>

<pre><code>&lt;?php 
session_start(); 
//imagecreate -- Create a new palette based image
$img = imagecreate(40, 20);
//displaying the random text on the captcha image
$black = imagecolorallocate($img, 0, 0, 0); 
$numero = rand(100, 999);
$number = $black . $numero;
$_SESSION['check'] = ($numero); 

$white = imagecolorallocate($img, 255, 255, 255); 
imagestring($img, 10, 8, 3, $numero, $white); 
header ("Content-type: image/png"); 
imagepng($img); 
?&gt;
</code></pre>

<p><strong>cc.php</strong></p>

<pre><code>&lt;?php
if(($_POST['check']) == $_SESSION['check']) { 
echo 'Input OK';
}else{ 
echo 'Input Wrong';        
}
</code></pre>
