CSS Form Builder non re-entrant or partly buggy ?
Hi,
Wondering why my form won't work anymore after editing and i found that the extension will create new variables names based on labels choosen, without removing old code or warning you.
So i get this king of duplicate code :
<?php
if ($_SERVER["REQUEST_METHOD"] == "POST") {
$WAFV_Redirect = "contact.php";
$_SESSION['WAVT_contact2_Errors'] = "";
if ($WAFV_Redirect == "") {
$WAFV_Redirect = $_SERVER["PHP_SELF"];
}
$WAFV_Errors = "";
$WAFV_Errors .= WAValidateRQ((isset($_POST["Contact_me_group_Name"])?$_POST["Contact_me_group_Name"]:"") . "",true,1);
$WAFV_Errors .= WAValidateEM((isset($_POST["Contact_me_group_Email"])?$_POST["Contact_me_group_Email"]:"") . "",true,2);
$WAFV_Errors .= WAValidateLE((strtolower(isset($_POST["Contact_me_group_Security_code"])?$_POST["Contact_me_group_Security_code"]:"")) . "",((isset($_SESSION["captcha_Contact_me_group_Security_code"]))?strtolower($_SESSION["captcha_Contact_me_group_Security_code"]):"") . "",true,3);
$WAFV_Errors .= WAValidateRX((isset($_POST["HiddenFields_fields"])?$_POST["HiddenFields_fields"]:"") . "","/.*/",false,5);
if ($WAFV_Errors != "") {
PostResult($WAFV_Redirect,$WAFV_Errors,"contact2");
}
}
?>
<?php
if (isset($_POST["SimpleContact_submit_x"]) && !isset($_GET["invalid"])) {
$WAFV_Redirect = "contact.php";
$_SESSION['WAVT_contact2_Errors'] = "";
if ($WAFV_Redirect == "") {
$WAFV_Redirect = $_SERVER["PHP_SELF"];
}
$WAFV_Errors = "";
$WAFV_Errors .= WAValidateRQ((isset($_POST["Contact_me_group_Nom"])?$_POST["Contact_me_group_Nom"]:"") . "",true,1);
$WAFV_Errors .= WAValidateEM((isset($_POST["Contact_me_group_Email"])?$_POST["Contact_me_group_Email"]:"") . "",true,2);
$WAFV_Errors .= WAValidateRQ((isset($_POST["Contact_me_group_Message"])?$_POST["Contact_me_group_Message"]:"") . "",true,3);
$WAFV_Errors .= WAValidateLE((strtolower(isset($_POST["Contact_me_group_Code_Securite"])?$_POST["Contact_me_group_Code_Securite"]:"")) . "",((isset($_SESSION["captcha_Contact_me_group_Code_Securite"]))?strtolower($_SESSION["captcha_Contact_me_group_Code_Securite"]):"") . "",true,4);
$WAFV_Errors .= WAValidateRX((isset($_POST["HiddenFields_fields"])?$_POST["HiddenFields_fields"]:"") . "","/.*/",false,5);
if ($WAFV_Errors != "") {
PostResult($WAFV_Redirect,$WAFV_Errors,"contact2");
}
}
?>
Regards