I've been thinking about easy ways to prevent spammy robots from submitting content into the public forms (e.g. contact forms) on sites.
I know a lot of sites will now ask the user a simple question (e.g. what is 2+4?).
If you had the following, would it be enough to deter most robots?
HTML
<form action="submit.php" method="post">
<input type="text" name="name" placeholder="Name" /><br />
<textarea name="message" placeholder="Message"></textarea><br />
<label for="test">I am a:</label>
<select id="test">
<option value="robot" selected="selected">Robot</option>
<option value="human">Human</option>
</select>
</form>
PHP
<?php
if ($_POST['test'] == 'robot') header ('Location: contact.php?err=nothuman');
// process form
?>
The idea being the robot will likely leave the option item on the selected item.
If anyone has another very simple solution I would be interested to hear?