Home arrow PHP arrow Validating Web Forms with the Code Igniter PHP Framework

Validating Web Forms with the Code Igniter PHP Framework

If you're a web developer, you've probably written any number of scripts designed to validate the input entered into a web form. More than likely, then, you'd like something that will make that job easier. Enter the Code Igniter PHP framework. In this fourth part of a nine-part series on this framework, you'll learn how to use it to do basic validation on a web form.

TABLE OF CONTENTS:
  1. Validating Web Forms with the Code Igniter PHP Framework
  2. Validating user-supplied data using the MVC pattern
  3. Displaying error messages when validating an online form
  4. Building a confirmation view file
By: Alejandro Gervasio
Rating: starstarstarstarstar / 18
September 03, 2008

print this article
SEARCH DEV SHED

TOOLS YOU CAN USE

advertisement

Introduction

As you know, not all the PHP frameworks available nowadays on the web have been created in the same way. This is particularly relevant when you need to choose one of them with which to start developing several web applications.

For example, Zend is a solid piece of software, best suited to building enterprise-level PHP programs. This means that some of its features can be pretty overwhelming for developers taking their first steps into the huge terrain of object-object programming.

However, among the numerous PHP frameworks that present a friendly learning curve, thereís one that stands from the rest, not only for its remarkable capabilities for developing complex applications in a short time, but for its minimal setup requirements.

Of course, as you might have guessed, Iím talking about Code Igniter (http://codeigniter.com), a software package created with PHP 4 that allows you to build database-driven PHP programs within minutes! No, really.

In the previous tutorial of this series, I demonstrated how to use this framework to develop a simple MySQL-driven application. It was tasked with pulling a few database records from a simple table to be displayed later on the browser.

In addition, itís worth mentioning that the application in question had the capacity for paging these records across several web documents, thanks to the assistance of the pagination class that comes bundled with Code Igniter.

Now that I have quickly summarized the topics that were discussed in the last tutorial, itís time to continue exploring the many other useful features offered by Code Igniter. Therefore, in the course of the next few lines, Iím going to show you how to use the validation class included with this framework to develop a PHP program that can be used to check data submitted through some web forms.

Once again, youíll have opportunity to see for yourself how easy it is to validate online forms with Code Igniter. Letís get started!



 
 
>>> 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: