Avance Zone

PHP Javascript Free Capcha

<div id="AvanceZone">
<?php
session_start();
if( isset($_POST['submit']))
 {
  $number1=rand(2,10);
  $number2=rand(3,10);
  $sum = $number1+$number2;
 
// For Debug  For Debug For Debug For Debug For Debug For Debug
//
//echo "Session value  is  <b> ". $_SESSION['val'] . " </b>But Typed AS : <b>" . $_POST['security_code'] . ".</b><br />";
//
// For Debug For Debug For Debug For Debug For Debug For Debug
 
  if( $_SESSION['val'] == $_POST['security_code'] )
  {
  echo 'Thank you. We Will Contact you Shortly';
    }
    else {
  echo 'Sorry, you have provided an Invalid security code';
       }
       session_destroy();
}
else
{
?>
 
 <form action="2.php" method="post">
  <label for="security_code">
  <?php
  $number1=rand(2,10);
  $number2=rand(3,7);
  $sum = $number1+$number2;
  $_SESSION['val']=$sum;
  echo "Please Enter The Sum Of <b> ". $number1 . " </b>And <b>" . $number2 . ".</b><br />";
  ?>
  </label>
  <input id="security_code" name="security_code" type="text" /><br />
  <input type="submit" name="submit" value="Submit" />
 </form>
 
<?php
 }
?>
</div>

Speak Your Mind

Tell us what you're thinking...
and oh, if you want a pic to show with your comment, go get a gravatar!

Avance Zone