I use this regular expression for honeypot spam prevention and has worked fine until the last few months. For some reason I am now getting bot spam.
<?php
if (isset($_POST["submit1"]) || isset($_POST["submit1_x"])) {
$WAFV_Redirect = "";
$_SESSION['WAVT_index_202_Errors'] = "";
if ($WAFV_Redirect == "") {
$WAFV_Redirect = $_SERVER["PHP_SELF"];
}
$WAFV_Errors = "";
$WAFV_Errors .= WAValidateRQ(((isset($_POST["player1"]))?$_POST["player1"]:"") . "",false,1);
$WAFV_Errors .= WAValidateRQ(((isset($_POST["tee1"]))?$_POST["tee1"]:"") . "",true,2);
$WAFV_Errors .= WAValidateRX(((isset($_POST["addblock"]))?$_POST["addblock"]:"") . "","/^$/i",false,6);
$WAFV_Errors .= WAValidateRX(((isset($_POST["seconddblock"]))?$_POST["seconddblock"]:"") . "","/^$/i",false,7);
if ($WAFV_Errors != "") {
PostResult($WAFV_Redirect,$WAFV_Errors,"index_202");
}
}
?>
<div id="form1_ProgressWrapper">
<span style="display:">
<?php $selected = explode(", ", ValidatedField("index_202","player1")); ?>
</span>
<form action="" method="post" enctype="multipart/form-data" name="form1" id="form1">
<input name="addblock" type="text" id="addblock" style="display:none" value="" />
<input name="seconddblock" id="seconddblock" type="text" style="display:none" value="" />
<span style="display:">
<label for="player1"><strong>*Your Name:</strong></label>
<select name="player1[]" id="player1" onchange="setSatsignup(document.form1.player1[document.form1.player1.selectedIndex].value)">
<option value="" selected="selected">Select From Dropdown</option>
<?php
do {
?>
<option value="<?php echo $row_rs_members['FirstName']?>,<?php echo $row_rs_members['LastName']?>,<?php echo $row_rs_members['GHIN_Number']; ?>"><?php echo $row_rs_members['FirstName']?> <?php echo $row_rs_members['LastName']?></option>
<?php
} while ($row_rs_members = mysql_fetch_assoc($rs_members));
$rows = mysql_num_rows($rs_members);
if($rows > 0) {
mysql_data_seek($rs_members, 0);
$row_rs_members = mysql_fetch_assoc($rs_members);
}
?>
</select>
<?php
if (ValidatedField('index_202','index_202')) {
if ((strpos((",".ValidatedField("index_202","index_202").","), "," . "1" . ",") !== false || "1" == "")) {
if (!(false)) {
?>
<span class="stylered">Name required</span>
<?php //WAFV_Conditional index.php index_202(1:)
}
}
}?>
<br />
<?php
if (ValidatedField('index_276','index_276')) {
if ((strpos((",".ValidatedField("index_276","index_276").","), "," . "1" . ",") !== false || "1" == "")) {
if (!(false)) {
?>
<span class="stylered">You are already signed up for Saturday</span>
<?php //WAFV_Conditional index.php index_276(3:)
}
}
}?>
<br />
<label for="email1"><strong>Email Confirmation </strong></label>
<select name="email1" id="email1">
<option value="" <?php if (!(strcmp("", (ValidatedField("index_202","email1"))))) {echo "selected=\"selected\"";} ?>>Select your Name if you want an email confirmation</option>
<?php
do {
?>
<option value="<?php echo $row_rs_members['EmailAddress']?>"<?php if (!(strcmp($row_rs_members['EmailAddress'], (ValidatedField("index_202","email1"))))) {echo "selected=\"selected\"";} ?>><?php echo $row_rs_members['FirstName']; ?> <?php echo $row_rs_members['LastName']?> </option>
<?php
} while ($row_rs_members = mysql_fetch_assoc($rs_members));
$rows = mysql_num_rows($rs_members);
if($rows > 0) {
mysql_data_seek($rs_members, 0);
$row_rs_members = mysql_fetch_assoc($rs_members);
}
?>
</select>
<br />
<br />
<label for="tee1"><strong>*Your Tee Choice:</strong></label>
<select name="tee1" id="tee1">
<option value="" selected="selected" <?php if (!(strcmp("", (ValidatedField("index_202","tee1"))))) {echo "selected=\"selected\"";} ?>>Select Your Tee</option>
<option value="Gold" <?php if (!(strcmp("Gold", (ValidatedField("index_202","tee1"))))) {echo "selected=\"selected\"";} ?>>Gold</option>
<option value="White" <?php if (!(strcmp("White", (ValidatedField("index_202","tee1"))))) {echo "selected=\"selected\"";} ?>>White</option>
<option value="Blue" <?php if (!(strcmp("Blue", (ValidatedField("index_202","tee1"))))) {echo "selected=\"selected\"";} ?>>Blue</option>
</select>
<?php
if (ValidatedField('index_202','index_202')) {
if ((strpos((",".ValidatedField("index_202","index_202").","), "," . "2" . ",") !== false || "2" == "")) {
if (!(false)) {
?>
<span class="stylered">Tee Required</span>
<?php //WAFV_Conditional index.php index_202(2:)
}
}
}?>
<br />
<br />
<label for="pairing1"><strong>Notes or Message:</strong></label><br />
<textarea name="pairing1" id="pairing1" cols="45" rows="5"><?php echo(ValidatedField("index_202","pairing1")) ?></textarea>
<br />
<br /><input name="FirstName" id="FirstName" type="hidden" value="" /><input name="LastName" id="LastName" type="hidden" value="" /><input name="GHIN_number" id="GHIN_number" type="hidden" value="" />
<input type="submit" name="submit1" id="submit1" value="Submit Saturday Signup" />
</span>
</form>
</div>