I have gone into this code and really cleaned it up to make it work properly with WordPress installs that are in subdirectories or wherever. I have also added a wicked little open source captcha script which I borrowed from the awesome folks at phpcaptcha.org to make the form 100 times more secure.
contact.php file and the
secureimage folder to your current WordPress theme’s directory and then create a page in you admin panel. Choose “Contact” as your template and save the page as “Contact”. You need to have your permalinks set to Custom Structure or else you would need to change line 15 to something like
?p=123 (change 123 to the ID of your contact page).