Web Design / HTML

  1. Home
  2. Computing & Technology
  3. Web Design / HTML
photo of Jennifer Kyrnin

Jennifer's Web Design / HTML Blog

By Jennifer Kyrnin, About.com Guide to Web Design / HTML since 1997

Reader Question: Using forms

Friday July 11, 2008

Question?
tanveen asks:

I have recently created a website for my friend and I'm facing a big problem. I put an online booking option for customers but the problem is that I don't know how to receive information from the web page.

My Thoughts
Forms are one of the most difficult parts of HTML to learn. Mostly because there are two parts to forms, and most people only learn the first part.

  • The HTML - what displays on the Web page
  • The program - what takes the form information and does something with it

The HTML is easy, you just learn the appropriate form tags and then put them on your Web page. If you're feeling especially adventurous, you can style your forms so that they look great on the Web page. But without the second part, the program, your forms will useless.

The easiest way to program your forms is with a mailto form. This doesn't require any programming knowledge, or even a server with programming language. The problem is, mailto forms don't always work. Plus, some webmail clients won't send mailto form data.

Another way to make a form do something is to use JavaScript. But JavaScript for forms won't do what most people want forms to do - namely send the form data by email or save it to a database. To do that you need a server program language like PHP or Perl.

More Help with Forms

What do you use to program your forms?
I write all my form programs myself using either PHP or Perl. But I know a lot of people who use pre-built scripts to handle form processing. How do you make your forms work? Let us know by posting in the comments or answering tanveen's's post.

Comments

July 11, 2008 at 10:20 am
(1) Corky says:

The way I would do this is, I would use perl to handle the form and email it to whom it has to go to. Then I would create a acknowledgement page that would inform the person that the information was sent to the proper person, department, etc.
There are tons of perl sites that have form programs on them. You have to know some perl programming, but this should be a very simple means of getting the job done. Just remember to direct the perl program to where perl is on the server.
Maybe, you can get someone to help with this, that knows perl.
Also, it will be a learning experience for the person doing the web site and hopefully gets them to learn more about web design.

July 11, 2008 at 12:06 pm
(2) Ollie Wells says:

Do some Google searches for sendmail.php You can then create the form as you like, using the php script to send the info.

July 11, 2008 at 6:12 pm
(3) Matthew says:

I use Joomla 1.5.4 to do everything.

July 12, 2008 at 3:46 pm
(4) Arthur says:

Whatever system you use to capture and store info from online forms, one major consideration is spam. It can be so frustrating to set up a form and get a bunch of spam nonsense jamming everything up.

July 12, 2008 at 6:38 pm
(5) Anne says:

I find that trying to select, install and get pre-coded scripts from the internet to work are at least as much of a pain as coding it myself. So I try to follow guides I can find on sites like this one step by step. Then when I think I have a handle on everything I make the changes I need so the form looks and acts the way I want.

July 12, 2008 at 6:51 pm
(6) Quayfee says:

I would offer one word of warning… be careful about the security of whatever script (perl or php) that you use to handle your form data. There are hundreds out there that you can use for free, many of which do not do anything to check the validity of the data that is submitted. Using an insecure form handler can lead to serious issues, even to the server getting blacklisted, which would lock out ALL email through that server to major ISPs.

If you’re using a good hosting company they may well have a script that has been specifically set up and secured for thier hosting plans, so a good start would be to contact them and ask. If the do they will normally have information on how to configure your form to work with it.

Learning to write your own will be time consuming, but very rewarding in the end and open up alot of other possibilities with whichever server side language you choose to use. But learn to code securely from the outset…

July 13, 2008 at 8:06 pm
(7) Randall "decibel.places" Goya says:

I am surprised nobody said anything about a database. Perhaps that is because the question asker is perceptably limited in knowledge of HTML, let alone PHP and MySQL.

There are good scripts out there – also Drupal has some scheduling modules (I use Drupal, not Joomla).

I agree with Quayfee to beware any situation when a user can input data as a potential security risk.

Arthur complained about spam, there are several techniques to address this, one popular method is provided by Carnegie Mellon’s ReCaptcha program. I have had success just adding a script that checks if a mouse is over the submit button when the form is submitted.

July 14, 2008 at 7:44 am
(8) NatureLimit says:

I try to follow guides I can find on sites like this one step by step. Then when I think I have a handle on everything I make the changes.It will be a learning experience for the person doing the web site and hopefully gets them to learn more about web design.

July 14, 2008 at 7:48 am
(9) NatureLimit says:

It will be a learning experience for the person doing the web site and hopefully gets them to learn more about web design.

July 14, 2008 at 7:23 pm
(10) Ken Davis says:

This is an awesome software for doing forms. I highly recommend this software for those who do not know PHP forms.

http://www.simfatic.com/

Leave a Comment

Line and paragraph breaks are automatic. Some HTML allowed: <a href="" title="">, <b>, <i>, <strike>

Discuss

Community Forum

Explore Web Design / HTML

About.com Special Features

Build Your Own Website

Step-by-step advice on how to do everything from choosing a Web host to promoting your content. More >

Connect Your Home Computers

Easy ways to connect two computers for networking purposes. More >

Web Design / HTML

  1. Home
  2. Computing & Technology
  3. Web Design / HTML

©2009 About.com, a part of The New York Times Company.

All rights reserved.