What I want is, the checking that i am doing after page submission in the php file will be transferred inside the jquery. What im doing is like the regisration of facebook that once you submit it and you input wrong characters, an error message will show up at the bottom.
We are required to use php, jquery is just optional.
Because you studying as I can imagine, always care about from where you study. Use example which is the official PHP documentation.
Then after being checked, it will be submitted to the php file to further check the characters inputted in the form, then will it will echo if an invalid character was found. The reason i want to put the php inside the jquery is for me to be able to show an error message in the div part of the HTML because once I submit the page, It goes to another blank page where the error message of the php shows up.
In this document, we have discussed Java Script Form Validation using a sample registration form.
Such code can now do no harm and is safe to be displayed on a page or inside an e-mail. if quotes are escaped with a slash \ let's remove that.
All those functions are called from another function.
It sets the focus to the input field until the user supplies a valid value.
Very first we have to create a form in html setting action “#” and method “POST” with some fields, when a user clicks on submit button all the data starts travel in URL but it will be hidden, as we set method = “POST”.