Professional Documents
Culture Documents
The concept is that automated bots usually fill in all fields on a form so that they don't get
caught out by missing required fields. This form simply hides the email address using PHP
and has an extra field that is shielded from users using CSS. If this extra hidden field is filled
in, then the form aborts and throws up a warning message, whilst not submitting the form.
(CSS is used as opposed to the hidden HTML attribute to prevent smarter bots from missing
out this field - also, the field is called an inconspicuous name that bots would not
understand). Unlike other forms, it doesn't inconvenience the user at all with CAPTCHA
images or anti-spam questions.
It's a little basic, but I hope people will find it useful The rest of the HTML page needs to
be made (i.e. the header etc.) and the styling obviously needs to be done, but the PHP form
is functional.
else {
if(isset($_POST['name'])) {
$name = $_POST['name'];
$email = $_POST['email'];
$company = $_POST['company'];
$website = $_POST['website'];
$formmessage = ($_POST['message']);
$emailmessage = "You have received a submission from your contact for
m.
Name: $name
Email: $email
Company: $company
Website: $website
Message: $formmessage
";
if(isset($name)) {
mail($to,$subject,$emailmessage,$headers);
?>
<?php if(isset($name)) {
} ?>