Entries Tagged 'PHP' ↓

Web Forms

One of the repetitive web development tasks is collecting form field input from a web page and doing something meaningful with that data.  People sign-on to check their e-mail and register for new services all of the time.  To do this, you have to key your information into a set of fields on a web page, and I’ll delve into the intricatcies of what happens behind-scenes when you do this.

As with any programming problem, there are a variety of ways to accomplish the task, each having its own set of advantages and disadvantages.  For now, I’ll use the term web form, although it isn’t a de-facto term used among programmers, to designate a web page where some types in data and sends clicks a button to send it off somewhere.  I’ll try to use terminology that the common person can understand.

Practical applications of using web forms include:

  • Registering people on a web site.
  • Logging a user onto a web site.
  • Allowing users to search for and view information.

There’s a plethora of web programming languages available:  PHP, Java, Ruby, .NET, etc.  Some languages are lax in what you can do where as others force you to do things a certain way.  Regardless of the language, there’s a common road map, or flow diagram, for processing a web form.

I’ll choose PHP as my choice of programming language because that’s what I actively use to build web pages.  In the next set of tutorials related to this topic, I’ll:

  1. Set up a web development environment in Ubuntu Linux.
  2. Show how to process web forms using PHP 5.
  3. Show how to process web forms using PHP 5 and AJAX.
  4. Show how to process web forms using PHP 5 and an application framework, the Zend Framework.

I’m aware that I used two buzz-words, AJAX and application framework.  I’ll explain them more in-depth in the subsequent tutorials.