BlueNebula
Junior Member
- Nov 25, 2009
- 100
- 60
Hey guys im running into some problems. Im trying to add this captcha to my form but when I hit the sign up button it just skips the captcha like it isnt even there it is tho.
Here is my form
Here is what im supposed to add into so it works. Instructions says "On your validation process, place this code:" Which I don't understand?
Any help is much appreciated!
Here is my form
Code:
<form method="post" action="">
<table cellpadding="0" cellspacing="0" border="0" class="form" style="margin-top: 40px; padding: 50px; border: 1px dotted #ccc;">
<tr><td><label for="username">Username:</label></td><td width="20"></td><td><input type="text" name="user" id="username" size="20" maxlength="25" style="margin-bottom: 10px;"/></td></tr>
<tr><td><label for="email">Email:</label></td><td width="20"></td><td><input type="text" name="email" id="email" size="20" maxlength="120" style="margin-bottom: 10px;"/></td></tr>
<tr><td><label for="password">Password:</label></td><td width="20"></td><td><input type="password" name="password" id="password" size="20" maxlength="25" style="margin-bottom: 10px;"/></td></tr>
<tr><td><label for="password2">Repeat password:</label></td><td width="20"></td><td><input type="password" name="password2" id="password2" size="20" maxlength="25"/></td></tr>
<tr><td><?
$captchaId = '**** '; // Set your captcha id here
$publicKey = '************************************************'; // Set your public key here
echo GetCaptcha($captchaId, $publicKey);
?></td></tr>
<tr><td colspan="2"></td><td><input type="submit" name="register" value="Signup" class="submit" /></td></tr>
</table>
</form>
Here is what im supposed to add into so it works. Instructions says "On your validation process, place this code:" Which I don't understand?
Code:
$captchaId = ''; // Set your captcha id here
$privateKey = ''; // Set your private key here
$challengeValue = $_POST['adscaptcha_challenge_field'];
$responseValue = $_POST['adscaptcha_response_field'];
$remoteAddress = $_SERVER["REMOTE_ADDR"];
if ("true" == ValidateCaptcha($captchaId, $privateKey, $challengeValue, $responseValue, $remoteAddress))
{
// Corrent answer, continue with your submission process
} else {
// Wrong answer, you may display a new AdsCaptcha and add an error message
}
Any help is much appreciated!