Forum Moderators: mack
Thanks - sorry if the questions are a bit basic, but I've spent a couple of weeks trying to solve these issues and have just ended up with a few more grey hairs....
1. What is the difference between CGI and PHP?
CGI is the Common Gateway Interface that all web submitted forms must use to pass data back and forth between server and client. In truth, PHP also uses the CGI gateway.
Perl and PHP (and other server-side languages) are scripting languages. Both use the CGI gateway on a Linux server. PHP is a simplified scripting language that is similar to perl, except that a) it exists directly within a page instead of on a server, and b) it has many built in functions to perform tasks that are (generally) programmed by hand in perl.
PHP will probably be easier for you to learn, although there are many (non-web) things you can do with perl you can't do with PHP.
2. Can anyone tell me how to get a CAPTCHA field into the form?
A captcha is generally generated by the server side language. There are many available in perl and PHP, look at some examples out there. You can't do it in Dreamweaver because Dreamweaver creates static files. You need to put your form into a script so the form and captcha can be generated dynamically. Get the scripting behind you first.
3. How do I put in a checkbox that must be ticked to allow form submission?
You can do this using Javascript, but the validation must be duplicated server side in your form processor script so if Javascript is disabled, you still catch it before submission.
4. Lastly, I found a site that sells 'form processor pro' and 'form builder' - I was tempted to buy, but looking at over $140 for both.
I don't know either of those, build it yourself and you won't need them. :-)
Many hosting services give you access to formmail without the need for you to install or code anything yourself, even if full PHP support isn't available.