Code: Select all
if (isset($_POST['subject']) && !empty($_POST['subject'])) {
if(isset($_POST['form_type'])) {$formtype = '('.$_POST['form_type'].')';}
if(isset($_SERVER['REMOTE_ADDR'])) {$remote_ip = 'IP: '.$_SERVER['REMOTE_ADDR'];}
audit('', "HOTBOT", "Bad ass spam attempt! $formtype, $remote_ip");
exit('Sorry, the form cannot be processed like this.');
}
Code: Select all
<label>(Leave this field as is.) <input name="subject" type="text" /></label>
<input type="hidden" name="form_type" value="Contact form" />
The problem is now that when I enter my info (and leave the honeypot field blank, of course), it just reloads the page with all fields still filled out but doesn’t send it on submission. If I fill the honeypot field, it correctly displays the exit message. I don’t get any errors (not even in my error logs), as far as I can see. Can you spot any issue with my code?
[edit]I tried it on another site and upon form submission the form’s error message container is actually loaded but without any message in it. [/edit]