|
Posted by Jerry Stuckle on 11/04/07 02:49
Angela wrote:
> That's extactly what I am wanting to do.
>
> Use Javascript/AJAX to display the error messages for user
> and use PHP (server side) to do the validation (regex, check db, etc).
>
> Purpose of looking at AJAX is because this is all done in 'real time'
> (asonychronous)
>
> Anyone with any simple examples?
>
> :)
>
> Tom wrote:
>> On Sat, 03 Nov 2007 13:11:44 -0500, Jerry Stuckle wrote...
>>> Angela wrote:
>>>> Hello
>>>>
>>>> Looking for a simple script example for PHP validation on form with
>>>> AJAX.
>>>>
>>>> Yes, I've google this many times over and there are a lot of
>>>> different AJAX frameworks to work with.
>>>>
>>>> Simple form where values/input is validated by a PHP script.
>>>>
>>>> Thanks greatly
>>>>
>>> Never depend on client-side anything for validation.
>>>
>>> You can use javascript to validate client-side, but when the user
>>> submits the data, you *must* validate it server-side to be safe.
>>>
>>> AJAX has nothing to do with the latter. It's just standard PHP
>>> validation techniques.
>>>
>>
>> You could use AJAX to display interactive messages and validate some
>> of the
>> data, but like Jerry mentioned, it is unreliable. Use your PHP to
>> validate the
>> information at the server whether or not you use AJAX to manage the
>> data on the
>> client side.
>>
>> Tom
>
And what happens when people have javascript disabled?
Javascript should be used to *enhance* the experience, not be *required*
by the experience.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
[Back to original message]
|