News Feed
Jobs Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Script-Tutorials.com:
Form Validation with Javascript and PHP
February 02, 2012 @ 09:07:40

On the Script-Tutorials.com site today there's a new tutorial about form validation using a combination of jQuery on the frontend and PHP on the backend.

In this tutorial, I will show you how to create an attractive, pleasant to look form for your website and then I will explain you how to dynamically validate them using Javascript. We'll also cover server-side validation with PHP to make everything 100% safe. This tutorial will help you to add more functionality to your forms which leads to better user experience and better quality of your website.

His sample form (name, password, email and gender) is made from some pretty simple HTML markup. The real trick comes with the jQuery validation on each field handled in an onKeyUp. Included are both a "password strength" method and an email validation method to check the format of the address. Errored fields have their background color changed to indicate that they've failed and some basic validation (length, password match, etc.) are also included. The PHP does much of the same validation once the form is posted and returns any error messages that might have come up.

You can download the code or try out a live demo to see the scripts together in action.

0 comments voice your opinion now!
form validation jquery javascript frontend backend tutorial


blog comments powered by Disqus

Similar Posts

SpinDrop.us: Cropping Images using DHTML (Prototype) and symfony

DevShed: Building Interpreter Classes with PHP 5

Symfony Blog: The "Practical symfony" book is now also available for Doctrine

Enrico Zimuel's Blog: PHP session sharing using Zend Server CE and MS SQL Server

WoorkUp.com: How-To Create Your Own Instant Search


Community Events











Don't see your event here?
Let us know!


hack facebook code opinion security component release composer threedevsandamaybe unittest hhvm language framework overview application podcast symfony2 install introduction package

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework