Home arrow Java arrow Interacting with PHP for Server-side Data Validation with AJAX
JAVA

Interacting with PHP for Server-side Data Validation with AJAX


Looking for new and creative ways to empower your AJAX-driven Web applications? Then you’ve landed at the right place. Welcome to the final part of the series “Server-side Data Validation with AJAX.” In three tutorials, this series demonstrates how to build a simple form checking system which uses AJAX to performing server-side validation on the data supplied by users.

Author Info:
By: Alejandro Gervasio
Rating: 4 stars4 stars4 stars4 stars4 stars / 18
July 25, 2006
TABLE OF CONTENTS:
  1. · Interacting with PHP for Server-side Data Validation with AJAX
  2. · Validating data on the server: building an input checking PHP class
  3. · Extending the functionality of the checking class: defining some additional methods
  4. · Assembling the pieces: completing the AJAX-driven checking application

print this article
SEARCH DEVARTICLES

Interacting with PHP for Server-side Data Validation with AJAX
(Page 1 of 4 )

Introduction

For those of you new to the topics discussed over the course of this series, let me put you quickly in the right context: my initial purpose was to build a quite simple form validation mechanism. It would combine the quick responsiveness of JavaScript for alerting users about what data is considered invalid, and the reliability of a server-side scripting language (in this case, PHP), in order to execute several input-checking routines.

Based on this schema, in the first article I constructed a sample online form that came in handy for implementing the basic structure of the validation system in question. Also, over the second tutorial, I went through the development of a group of JavaScript functions, focused on sending out HTTP requests via AJAX, in conjunction with controlling the proper flow of data validation.

The complete client-side source code of this AJAX application has been developed already. You also know each time a user enters data in a particular form field because this input is submitted to the server in the background. So the only programming block that remains to be built is the one related to executing server validation on the data itself.

In this concluding part, I'll write a PHP class that will be responsible for checking the validity of the data submitted with AJAX, in this way completing the entire application. Thus, let's waste no more time in preliminaries and see how the PHP class that I mentioned before will be properly coded.


blog comments powered by Disqus
JAVA ARTICLES

- Java Too Insecure, Says Microsoft Researcher
- Google Beats Oracle in Java Ruling
- Deploying Multiple Java Applets as One
- Deploying Java Applets
- Understanding Deployment Frameworks
- Database Programming in Java Using JDBC
- Extension Interfaces and SAX
- Entities, Handlers and SAX
- Advanced SAX
- Conversions and Java Print Streams
- Formatters and Java Print Streams
- Java Print Streams
- Wildcards, Arrays, and Generics in Java
- Wildcards and Generic Methods in Java
- Finishing the Project: Java Web Development ...

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 

Developer Shed Affiliates

 




© 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials