Page is a not externally linkable
swa66 - 11:18 am on Sep 14, 2012 (gmt 0)
There's 2 steps, both easy:
1. Add one line to your .htaccess file (assuming you're using an apache server and you have not disabled the use of .htaccess files by disallowing overrides; in which case the same line needs to be added to your httpd.conf and the apache server needs to be restarted.).
AddType application/x-httpd-php .htm .html
or create the file with that content if you have none.
2. add the php code you created to your .html files
<?php "your code goes here" ?>
You can split this out over multiple line if you prefer:
as you please. <?php
"your code goes here"
?>
That's it, unless you're not using apache, in which case I've no clue whatsoever.
Now the core of the problem: spammers submitting forms isn't all that easy to solve, and I kinda doubt adding something to the creation of the form alone is going to stop them - I'd assume there's going to be a need for a lot more where you process the form submissions.