Ajax function has nearly 24 attributes, we have to pass these parameters into the ajax function , some of them are required and some of them are optional. Now we will discuss the important parameters
We are going to take the two input fields for username and password. Then on button submission we will send username and password to the action.php page using ajax() function.
In action page if have write condition if the username and password both are equal to 'admin' then the data is valid else the data is invalid.