Only Captcha
Hi,
sometimes its getting very very exhausting, like inserting ONLY the captcha to my form. I tried to make the chages CSSFB did, but it does not work.
<?php require_once("../WA_ValidationToolkit/WAVT_Scripts_PHP.php"); ?>
<?php require_once("../WA_ValidationToolkit/WAVT_ValidatedForm_PHP.php"); ?>
<?php
if (isset($_POST["buttonRegister"])) {
$WAFV_Redirect = "";
$_SESSION['WAVT_register_942_Errors'] = "";
if ($WAFV_Redirect == "") {
$WAFV_Redirect = $_SERVER["PHP_SELF"];
}
$WAFV_Errors = "";
$WAFV_Errors .= WAValidateLE((strtolower(isset($_POST["code"])?$_POST["code"]:"")) . "",((isset($_SESSION["captcha_code"]))?strtolower($_SESSION["captcha_code"]):"") . "",true,1);
if ($WAFV_Errors != "") {
PostResult($WAFV_Redirect,$WAFV_Errors,"register_942");
}
}
?>
<?php
if(isset($_POST["buttonRegister"])){
$WA_Redirect_URL = "../index.php";
$WA_Redirect_KeepQS = false;
if ($WA_Redirect_URL != "") {
if ($WA_Redirect_KeepQS && $WA_Redirect_URL != "" && isset($_SERVER["QUERY_STRING"]) && $_SERVER["QUERY_STRING"] !== "") {
$WA_Redirect_URL .= ((strpos($WA_Redirect_URL, '?') === false)?"?":"&").$_SERVER["QUERY_STRING"];
}
header("Location: ".$WA_Redirect_URL);
}
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Registrieren</title>
</head>
<body>
<form id="formRegister" method="post" action="">
<ul>
<li>
<label for="gender">Anrede:</label>
<select name="gender" id="gender">
<option>Auswahl</option>
<option value="1">Herr</option>
<option value="2">Frau</option>
</select>
</li>
<li>
<label for="firstname">Vorname:</label>
<input type="text" name="firstname" id="firstname" />
</li>
<li>
<label for="lastname">Nachname:</label>
<input type="text" name="lastname" id="lastname" />
</li>
<li>
<label for="birthday">Geburtsdatum:</label>
<input type="text" name="birthday" id="birthday" />
</li>
</ul>
<ul>
<li>
<label for="email1">Email-Adresse:</label>
<input type="text" name="email1" id="email1" />
</li>
<li>
<label for="email2">Email-Adresse (wiederholen):</label>
<input type="text" name="email2" id="email2" />
</li>
</ul>
<ul>
<li>
<input type="checkbox" name="termsandconditions" id="termsandconditions" />
<label for="termsandconditions"><a href="#">AGB</a> & <a href="#">Bedingungen</a> gelesen und verstanden</label>
</li>
<li>
<label for="code">Sicherheitsabfrage:</label>
<img src="../WA_ValidationToolkit/WAVT_CaptchaSecurityImages.php?field=code&font=Fonts/MOM_T___.TTF" alt="Security Code" class="Captcha" /></li>
<li>
<input type="text" name="code" id="code" />
</li>
</ul>
<ul>
<li>
<input type="submit" name="buttonRegister" id="buttonRegister" value="Jetzt kostenlos registrieren!" />
</li>
</ul>
</form>
</body>
</html>
For field I only changed the name "?field=fieldset_group_Security_code" to "?field=code" cause its the label of the captcha and the name/id of the textfield.
I would be so nice, to show, how this works, without using the CSSFB that creates too much code and does not validates like I want. I only need the captcha :-(
Denis