I am a newbie so please be gentle!
I have been charged with modifying some php pages and include controls that will reduce the number of spam.
I have a form page (contact.php)to which I added the following lines:
contact.php in turn calls ContactFormProcessor.php which validates the entries on the form and submits the email. I've added the code in:
$blocker->setTimeWindow(2,30); // set the min and max time in seconds for a form to be submitted
$blocker->setTrap(true,"mail"); // called here, because it has been called on the form page as well (same trap name!)
if ($_POST) $param=$_POST;
elseif ($_GET) $param=$_GET;
if (!$param) die("Error");
Am I on the right track? I'm very very new to PHP so no flames please!
David K. Lynn
|2008-05-26 08:04:11 - In reply to message 1 from Peter Wong|
You appear to be on the right track but, as I just mentioned in another thread, this is a precursor to validation checks you MUST perform on the input data before forwarding or accessing a database.