2 Server validations on page
Hello,
I got a big problem. I copy and paste my standard server validation on every page (before page loads).
I saw that it got a special number and the name of the page.
for example WAVT_profileimage_837_Errors
Later I created a server validation for the form on the page.
A new name and a new number was created. but in the "show if" the first name and nuber was used, so the show if doesnt work.
how can I fix that without doining everything new?
Denis
<?php require_once("WA_ValidationToolkit/WAVT_Scripts_PHP.php"); ?>
<?php require_once("WA_ValidationToolkit/WAVT_ValidatedForm_PHP.php"); ?>
<?php
if ("" == "") {
$WAFV_Redirect = "index.php";
$_SESSION['WAVT_server_345_Errors'] = "";
if ($WAFV_Redirect == "") {
$WAFV_Redirect = $_SERVER["PHP_SELF"];
}
$WAFV_Errors = "";
$WAFV_Errors .= WAValidateUR($_GET['url'] . "","false",true,1);
if ($WAFV_Errors != "") {
PostResult($WAFV_Redirect,$WAFV_Errors,"server_345");
}
}
?>
<?php
if (($_SERVER["REQUEST_METHOD"] == "POST") && (isset($_SERVER["HTTP_REFERER"]) && strpos($_SERVER["HTTP_REFERER"], $_SERVER["SERVER_NAME"].$_SERVER["PHP_SELF"]) > 0) && isset($_POST)) {
$WAFV_Redirect = "server.php";
$_SESSION['WAVT_server_102_Errors'] = "";
if ($WAFV_Redirect == "") {
$WAFV_Redirect = $_SERVER["PHP_SELF"];
}
$WAFV_Errors = "";
$WAFV_Errors .= WAValidateRQ($_POST['test'] . "",true,2);
if ($WAFV_Errors != "") {
PostResult($WAFV_Redirect,$WAFV_Errors,"server_102");
}
}
?>
<!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=utf-8" />
<title>Unbenanntes Dokument</title>
</head>
<body>
<?php
if (ValidatedField('server_345','server_345')) {
if ((strpos((",".ValidatedField("server_345","server_345").","), "," . "2" . ",") !== false || "2" == "")) {
if (!(false)) {
?>
dfgsdfg
<?php //WAFV_Conditional server.php server_345(2:)
}
}
}?></body>
</html>