I am thinking on how to implement this scenario:
I have a table orders where there is a serialNumber field. Then I also a have a PHP page with a form. What I am thinking of doing is that, onBlur or on keypress enter/return of a <input type=text> field, I would like an ajax/jquery script to check the serial number from the text box input if it has an existing record in my mySQL database. Then the script will warn the user that the serial number exists already in the database and will not allow submission.
I know how to implement it with standard form submission but I was thinking is it can be done without the literal pressing of the submit button.
Is there a way to implement this?
for this you can use javascript. create on javascript that called on textbox on blur event.
here i created on function that called on textbox on blur event.
and create one php file with the name checkusername.php and pass your value through query string.
php code as follow.
here from php if username find it will return value and you can get value in your javascript function. i hope it will help you.