Forum Moderators: coopster

Message Too Old, No Replies

Field Validation

         

tonynoriega

3:53 pm on Nov 29, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



litte different issue here.... PHP in conjunction with Mysql..

i have a registration form that my agents fill out for new "lead contacts"...

Is it possible to have the "last_name" field validate whether that last name is in the database already?

maybe once they "Tab" out of the field, or if they click another field, it will call to the dbase table to see if that name is already entered?

is there another way i should be thinking about this?

i just dont want them to have to enter all of the 50 fields, get to the end, hit submit and then realize the record already exists...

d40sithui

4:04 pm on Nov 29, 2007 (gmt 0)

10+ Year Member



1) theres a onkeyup() js function that works in conjunction with AJAX that can help you to validate the value on the same page after a user types something in a form.

2)or you can always save the $_POST data in a SESSION and redisplay them in the form when any of the fields fail to validate. clear the SESSION when you're done.

henry0

5:29 pm on Nov 29, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You may also do a quick ajax or a redirect to the same page
by first entering only one or two unique data and check if they exist
if they exists then it could be an update if update needed

BTW
I often noticed that even seasoned desk employees do not always use tab when filling a form