Jump to content

Captcha Problem


Lamez

Recommended Posts

Ok I set up my captcha to check to see it the code matches the image through a form action of course. Well it the code it correct it goes ahead and adds the user info into the database (its a registration form). If it is not it goes back to the registration page and says the captcha is incorrect. Well even when I type in the correct code it says I entered it wrong. Here is some of my scripts

 

My Registration Form

<?php 
$cryptinstall="_bin_/crypt/./cryptographp.fct.php";
include $cryptinstall; 
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" type="text/css" href="style/default.css"/>
<title>Lamez's Corner</title>
</head>
<body>
 <div class="logo"><img src="style/img/logo.gif" alt="Lamez's Corner" /></div>

<?php
$current_page = "register";
include_once "style/include/menu.php";
?>



<?php
$getlink = $_GET["process"];

if ($getlink == "signup") { //the registration form
  include ("style/include/pages/reg1.txt");
    echo ("<center>");
      dsp_crypt(0,1);
    echo ("</center>");
   include ("style/include/pages/reg2.txt");
   
   }
elseif ($getlink == "cap_error") {
include ("style/include/pages/err1.txt");
include ("style/include/pages/reg1.txt");
    echo ("<center>");
      dsp_crypt(0,1);
    echo ("</center>");
   include ("style/include/pages/reg2.txt");


   
}else{

print <<<HERE
<div class="ann">
   <p class="center">
Welcome Soon To Be User, before sigining up you will have to provide a correct e-mail address, we do not check to make sure it is correct,    we assume. We    need your e-mail address incase you ever loose your password, and so we can e-mail you important updates. So please provide a correct e-mail address.
   </p>
     <p class="center">-Lamez</p>
     <p class="center"><a href="?process=signup">Continue!</a></p>
  </div>
HERE;
}
?>

<div class="footer">
<p> Site Template & Original Site Content
<br />© 2007-2008 <a href="mailto:lamez@lamezz.com">James Little</a>
</p>
</div> 
  
<div class="spacer">
</div>

</body>
</html>

 

Reg1.txt

<div class="box">
<h4>Register</h4>
  <form action="_bin_/crypt/check.php?<?PHP echo SID; ?>" method="post" onSubmit="style/include/js/check_form.js">
    <p class="center">Note: Marked <font color="#000099">*</font> are required</p>
    <p class="center">Username: <font color="#000099">*</font><br />
    <input type="text" name="username" size="20">
    <br />
    <br />
    Password: <font color="#000099">*</font><br />
    <input type="password" name="password" size="20" maxlength="12"> 
<br />
<br />
Verify Password: <font color="#000099">*</font><br />
<input type="password" name="password2" size="20" maxlenth="12">
    <br />
    <br />
    First Name:<br />
    <input type="text" name="name1" size="20">
    <br />
    <br />
    Email: <font color="#000099">*</font><br />
    <input type="text" name="email" size="20">    

reg2.txt

<p class="center"><br />
    Security Code:<font color="#000099">*</font>
    <input id="security_code" name="security_code" type="text" autocomplete='off' />
<br />
<br />
    <input type="submit" value="Sign Up">
   </p>  
</form>
</div>

 

check.php

<?php 
$cryptinstall="./cryptographp.fct.php";
include $cryptinstall; 

if (chk_crypt($_POST['code'])) 
header("Location: ../register.php");
else header("Location: ../../register.php?process=cap_error");
?>

 

Thanks Guys!

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.