Programming Tutorials Browser Tutorials Articles Struts Tutorials Hibernate Tutorials

  Tutorial: PHP Form Processing Phorm Manager Tutorial

In this part four of a series on HTML form handling with PHP, it explains how to create a powerful PHP form handler, called Phorm Manager. Topics include: Design goals, Internal data management, form validation, and more. Full source code available.

Tutorial Details:

PHP Tutorial

In the last article , the Phanatic was leading an expedition into a largely uncharted area. The conceptual project was a generalized form handler. The task's starting point was Matt Wright's famous "formmail" and included adding many more bells and whistles. While putting together the last tome, time and space were closing in on us, and in an effort not to strain the Phanatic's rapidly aging brain, we pulled into shore for a rest. Let's review the project's design goals before setting out to sea again.

Design goals
The desirable conceptual characteristics of the form handler and the developed script should, based upon the form designer's choice:
Display a neatly formatted output of the form's variables
E-mail a neatly formatted output of the form's variables to a designated recipient
Optionally send a neatly formatted receipt to the form's submitter
At the conclusion of the process, redirect the user's browser to a designated URL, or display a "thank you" message
Validate designated fields for non-null, e-mail address, ZIP code, and numeric
Allow user selection of cosmetic properties
Allow users maximum latitude in the selection of form names
Permit section headers
Include selected environment variables in the output display
Some of the task's more challenging programming considerations are:
Detect if the form was submitted using the GET or POST method
Delineate between HIDDEN control variables and unknown user variables
For security reasons, only allow e-mail requests from designated domains
Deal with form elements having multiple values
Validate selected fields such as e-mail addresses, ZIP codes, and numeric data.
Some of these issues were stowed away in the last article , so you might want to review that tome before continuing.

The Phanatic is a little late with this column because, as usual, things take longer than estimated, especially with a Herculean task like this one. This is a major script and as such deserves a special name. After burning some midnight oil and injecting enough sugar to kill a small colony of rodents, we have it: "The Phorm Manager," possibly a little grandiose, but what's the point of being a Phanatic if one is not somewhat pompous.


 

Read Tutorial at: Click here to view the tutorial

Rate Tutorial:
PHP Form Processing Phorm Manager Tutorial

View Tutorial:
PHP Form Processing Phorm Manager Tutorial

Related Tutorials:

Focus on Swing - JavaWorld - July 1998
Focus on Swing - JavaWorld - July 1998
 
Advanced form processing using JSP
This article examines the processing of a user registration form using JSP and JavaBeans while implementing the Memento design pattern.
 
XSL gives your XML some style - JavaWorld June 2000
XSL gives your XML some style - JavaWorld June 2000
 
Matchmaking with regular expressions - JavaWorld July 2001
Matchmaking with regular expressions - JavaWorld July 2001
 
Facilitate form
Facilitate form processing with the Form Processing API
 
Boost Struts with
Boost Struts with XSLT and XML
 
Yes, you can secure your Web services documents, Part 2
Yes, you can secure your Web services documents, Part 2
 
Sun boosts
Sun boosts enterprise Java
 
The Java Web Services Tutorial
This tutorial is a beginner\'s guide to developing Web services and Web applications using the Java Web Services Developer Pack (Java WSDP).
 
The J2EE 1.4 Tutorial
The J2EE 1.4 Tutorial is a guide to developing enterprise applications for the Java 2 Platform, Enterprise Edition (J2EE) version 1.4. Here we cover all the things you need to know to make the best use of this tutorial.
 
Advanced form processing using JSP
Processing HTML forms using servlets, or more often, CGI scripts, is one of the most common operations performed on the Web today. However, that JavaServer Pages (JSPs) can play a significant role in sophisticated form processing is a little-known secret.
 
The JavaTM Web Services Tutorial
A beginner's guide to developing Web services and Web applications on the Java Web Services Developer Pack
 
Welcome to the Apache Struts Tutorial
This is the complete Struts Tutorial. Explains ActionForm Action Class Validation Framework.
 
Getting Started With the Mobile 3D Graphics API for J2ME
This tutorial introduces the Mobile 3D Graphics API for J2ME, JSR 184. The article presents an overview, potential application areas, the differences between JSR 184 and two related APIs, the classes in the new optional package, the programming model, the
 
The J2EE Architecture allows the programmers to divide their work into two major categories Business Logic Presentation
The J2EE Architecture allows the programmers to divide their work into two major categories Business Logic Presentation Logic J2EE Architecture The J2EE Architecture allows the programmers to divide their work into two major categories: Business
 
Introduction to the JSP Java Server Pages
Introduction to the JSP Java Server Pages Welcome to JSP Section Introduction To JSP Java Server Pages or JSP for short is Sun's solution for developing dynamic web sites. JSP provide excellent server side scripting support for creating database
 
We are providing Downloadable Version of Mandrake 10.1 Official Edition Linux CD's.
We are providing Downloadable Version of Mandrake 10.1 Official Edition Linux CD's. Mandrake 10.1 Official Edition Linux Now Available Mandrake 10.1 Official Edition CD's Mandrakelinux 10.1 Official is a new-generation Linux operating system for
 
We are providing Downloadable Version of Mandrake 10.1 Power Pack Linux CD's.
We are providing Downloadable Version of Mandrake 10.1 Power Pack Linux CD's. Mandrake 10.1 Power Pack Linux Now Available Mandrake 10.1 Power Pack CD's Power Pack is a Linux system that will appeal to all advanced users. It's great for Office
 
Buy SuSe 9.1 Personal CDs in India from us. Suse 9.1 Personal is available with us.
Buy SuSe 9.1 Personal CDs in India from us. Suse 9.1 Personal is available with us. SuSe 9.1 Personal Linux Now Available SuSe 9.1 Personal CD's SuSE 9.1 Personal Edition was based on the x86 port of the Personal Edition, and it includes all of
 
Beginner to advance guide to the Apache Struts
Beginner to advance guide to the Apache Struts The Complete Apache Struts Tutorial This complete reference of Jakarta Struts shows you how to develop Struts applications using ant and deploy on the JBoss Application Server. Ant script is provided
 
Site navigation
 

 

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2006. All rights reserved.