AJAX
  Home arrow AJAX arrow PHP AJAX Form Validation
Dev Shed Forums  
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Smartphone Development  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Mobile Linux  
App Generation ROI  
IBM® developerWorks  
Forums Sitemap  
E-Commerce Hosting  
Linux Web Hosting  
Managed Hosting  
Small Business Hosting  
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? 
Google.com  
AJAX

PHP AJAX Form Validation
By: Codex-M
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 8
    2009-10-22


    Table of Contents:
  • PHP AJAX Form Validation
  • AJAX Validation Process Overview
  • AJAX Web Form and the Required Files
  • The PHP script to process AJAX inputs

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      error-file:tidyout.log Del.ici.ous error-file:tidyout.log Digg
      error-file:tidyout.log Blink error-file:tidyout.log Simpy
      error-file:tidyout.log Google error-file:tidyout.log Spurl
      error-file:tidyout.log Y! MyWeb error-file:tidyout.log 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


    PHP AJAX Form Validation
    ( Page 1 of 4 )

    Many sites feature web forms to collect information from users. Unfortunately, these forms often provide a poor experience for the user, with predictable results. This article will show you how to make filling out web forms more fun (or at least less painful) for your users with the help of PHP and some AJAX magic.

    One of the most important requirements for PHP web forms is usability; it's the goal of many web designers to improve the user's experience. With classic PHP web forms, a user is required to enter information in the form and then press the submit button. The PHP script will then validate the data entry to make sure the user has entered the correct information -- if it is correct, the user will then be taken to a new page (a success page, for example).

    However, things can get a bit uncomfortable in the classic PHP web form when a data entry mistake occurs. If a mistake occurs, PHP will output error messages on the other pages, and the user will be required to type all the information in over and over again. This might be OK for shorter web forms, but it is inefficient for longer web forms (such as a sign up form on large websites where lots of fields are required like the address, phone number, birthday, etc).

    The obvious result of this process is a poor user experience. If your web form is not user-friendly, users will avoid your website, and worse, this will affect your sales.

    With the use of AJAX, PHP web forms can be made as user friendly as possible. In this article, I will show how to use AJAX technology along with PHP to make user friendly web forms that satisfy the requirements listed below:

    1. If a mistake occurs, accurate feedback from the server will be shown to the user, pinpointing where the exact data entry mistake occurred.

    2. If a mistake occurs, aside from giving accurate feedback, the user will not need to type in all the fields all over again. This means the page will not be reloaded or refreshed.

    3. If there is no mistake or the user successfully enters all the information correctly, the correct information can be shown.



     
     
    >>> More AJAX Articles          >>> More By Codex-M
     

       

    AJAX ARTICLES

    - PHP AJAX Form Validation
    - Completing a User-Defined CSS Website with P...
    - Create a User-Defined CSS Website with PHP
    - Build A Better Twitter Chat Client Than Cham...
    - Using Division Equations to Make Web Forms S...
    - Using Integer Multiplication to Protect Web ...
    - Using Simple Checksums for Web Form Verifica...
    - Protecting Web Forms with AJAX
    - Using Prototip with AJAX
    - Using Prototip
    - Using the google.load() Method with Google`s...
    - How to Handle Ajax Errors
    - Uncompressing Source Files with Google`s AJA...
    - Using the jQuery Framework with Google`s Aja...
    - Using Google`s Ajax Libraries API




    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 6 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek