PHP
  Home arrow PHP arrow Building a PHP 5 Form Processor: Using...
Dev Shed Forums 
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Sun Developer Network 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Mobile Linux 
App Generation ROI 
VPS Hosting 
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
PHP

Building a PHP 5 Form Processor: Using the Form Processor Package
By: Alejandro Gervasio
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 21
    2006-01-30

    Table of Contents:
  • Building a PHP 5 Form Processor: Using the Form Processor Package
  • Getting started: constructing programmatically an online form
  • Performing server-side validation: implementing the “validator” module
  • Gluing the pieces: putting the form processing modules to work together
  • The complete application at a glance: listing the complete code of the form processor

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Building a PHP 5 Form Processor: Using the Form Processor Package


    (Page 1 of 5 )

    Welcome to the last part of the series “Building a PHP 5 form processor.” In three parts, this series goes through the development of an extensible form processor package in PHP 5, explaining its benefits and demonstrating its implementation.

    Introduction

    Returning for a moment to the previous article, I put my effort into writing a reusable class, which originally exposed a set of predefined methods, useful for performing server-side validation on user-supplied data.

    If you’ve been reading the earlier tutorials, then you know that the goal of this series was developing a PHP form processing package, comprised of two highly generic components. The first component is a form generator module, which presents a bunch of classes for programmatically constructing online forms, offering optional basic client-side validation capabilities. The second one is a form validation module that exposes a series of methods for validating user-provided data. Together, both components can be implemented as a standalone package within a PHP application, in order to build and quickly process web forms.

    Now, before proceeding further, let’s spend a few minutes discussing the objectives of this last tutorial, so you can have an accurate idea of how I’ll use this form processing library. Basically, I’ll set up an example, in order to demonstrate the functionality of both modules within a real application. First, I’ll use the corresponding classes for constructing an online form, then I’ll instruct the application to apply client-side validation on some of the form fields. Finally I'll have the application perform server-side checking on the form data, by displaying the appropriate error messages if any values entered on the form eventually fail to pass the verification process.

    So, that’s the theory. Let’s now turn our attention to writing the hands-on example. You’ll have a really good time. Let’s go!

    More PHP Articles
    More By Alejandro Gervasio


       · The last article of this series shows how to use the form processor package by...
       · This tutorial is great :)I used the info to write my own classes for the...
       · Thanks for your compliments on this PHP tutorial. Also, I'm glad to know that the...
       · Hi, when running this code I receive an undefined index: int message on the...
       · Hi Jon Paul,Thank you for the comments on my PHP article. It’s hard to know...
       · This was a nice read - took me a few hours but now I got my form processing library....
       · Just put the javascripts in a separate .js file and have the path for the...
       · Thanks for the comments. I already emailed you.Regards.
       · Thanks for the comments. Yes, that's exactly what should be done to get the library...
     

       

    PHP ARTICLES

    - Authentication Scripts for a User Management...
    - Utilizing the Use Keyword for Namespaces in ...
    - Building a User Management Application
    - Working With Different Namespaces in PHP 5
    - User Management Explained: Overview
    - Using Namespaces in PHP 5
    - Database Security: Guarding Against SQL Inje...
    - Building a Modular Exception Class in PHP 5
    - Database and Password Security for Web Appli...
    - Handling MySQL Data Set Failures in PHP 5
    - Building Site Registration for Web Applicati...
    - Intercepting Customized Exceptions in PHP 5
    - Securing Your Web Application Against Attacks
    - Sub Classing Exceptions in PHP 5
    - Authentication for Web Application Security





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
    Stay green...Green IT