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

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

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.

TABLE OF CONTENTS:
  1. Building a PHP 5 Form Processor: Using the Form Processor Package
  2. Getting started: constructing programmatically an online form
  3. Performing server-side validation: implementing the “validator” module
  4. Gluing the pieces: putting the form processing modules to work together
  5. The complete application at a glance: listing the complete code of the form processor
By: Alejandro Gervasio
Rating: starstarstarstarstar / 22
January 30, 2006

print this article
SEARCH DEV SHED

TOOLS YOU CAN USE

advertisement

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
 

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort
   

PHP ARTICLES

- Hackers Compromise PHP Sites to Launch Attac...
- Red Hat, Zend Form OpenShift PaaS Alliance
- PHP IDE News
- BCD, Zend Extend PHP Partnership
- PHP FAQ Highlight
- PHP Creator Didn't Set Out to Create a Langu...
- PHP Trends Revealed in Zend Study
- PHP: Best Methods for Running Scheduled Jobs
- PHP Array Functions: array_change_key_case
- PHP array_combine Function
- PHP array_chunk Function
- PHP Closures as View Helpers: Lazy-Loading F...
- Using PHP Closures as View Helpers
- PHP File and Operating System Program Execut...
- PHP: Effects of Wrapping Code in Class Const...

Developer Shed Affiliates

 


Dev Shed Tutorial Topics: