homepage Welcome to WebmasterWorld Guest from 23.23.22.200
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / WebmasterWorld / New To Web Development
Forum Library, Charter, Moderators: brotherhood of lan & mack

New To Web Development Forum

    
Help with forms please!
steakaphagus




msg:3711962
 11:28 am on Jul 31, 2008 (gmt 0)

Hi guys, wonder if anyone could help with a few form probs I have? I've been slowly learning Dreamweaver over the last couple of years, and have now half built a website in my spare time - not yet online though. I'm at the stage now of trying to put in a form for contact (and one for newsletters).
Can I ask:
1. What is the difference between CGI and PHP? I'd just got my head half around CGI (found a free script called formail that looks OK), when I stumbled on an article talking about PHP in forms - which should I use?
2. Can anyone tell me how to get a CAPTCHA field into the form? DW doesn't seem to have this option....
3. How do I put in a checkbox that must be ticked to allow form submission? (I want to display my Ts and Cs which must be scrolled through to allow form 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. They seem to promise good things and might solve the above issues, but I really can't afford to waste such money - does anyone use these/have any views on them?

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....

 

rocknbil




msg:3712290
 5:37 pm on Jul 31, 2008 (gmt 0)

Welcome aboard steakaphagus!

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. :-)

steakaphagus




msg:3712494
 9:42 pm on Jul 31, 2008 (gmt 0)

Thanks rocknbil, will keep ploughing away!
I agree about the 'buying software' issue - it kind of feels wrong to buy in such things for the site, as it takes out the pride and satisfaction of being able to see a site up and running and be able to say you did it yourself......

piatkow




msg:3714277
 2:27 pm on Aug 3, 2008 (gmt 0)

From the tone of the original post I suspect that PHP support wasn't on the agenda when you signed up for a hosting deal. If you have a budget hosting package then it is possible that PHP isn't included and if you are using a "free" service then it is almost certain.

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.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / WebmasterWorld / New To Web Development
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved