AJAX - PHP validation [message #39114] |
Sun, 30 September 2007 06:38 |
|
esm2002
Messages: 339 Registered: May 2002 Location: Atlanta Georgia
Karma: 0
|
Senior Member |
|
|
I have a page where I use AJAX to call a PHP file which validates a couple of fields in a form. I use onblur to call a JS function which is a AJAX call a PHP file which checks the field for validity.
I have read a little about using JS to validate client-side (folks say this is a thing to do) and PHP to validate server-side (folks say this is a must).
So where does AJAX fit into the validation of form data...???
I have read where JS is useless if the surfer has it turned off. But you cannot really use my site if JS is turned off.
Comments???
.
Gene
"The older I get, the more I admire competence, just simple competence in any field from adultery to zoology."
|
|
|
|
Re: AJAX - PHP validation [message #166645 is a reply to message #39114] |
Sat, 04 February 2012 09:24 |
NeXuS
Messages: 121 Registered: July 2010 Location: South Korea
Karma: 5
|
Senior Member Contributing Core Developer |
|
|
What you can use AJAX for is:
- local verification
- remote verification
Local verification: you check things like "password1 == password2"
Remote verification: you call a script on the server (PHP,Perl,etc.) which tells you if a parameter is valid (e.g. usernamve available)
As already stated you will anyway to redo the checks server side.
[Updated on: Sat, 04 February 2012 09:25] Report message to a moderator
|
|
|