Archive for the Javascript Category
0
There are times where you need to validate a form to a data stored in a database without the need to submit the form beforehand. The solution - Ajax (shorthand for asynchronous JavaScript and XML). For example, you are creating a user registration form where obviously, the username to choose from needs to be unique. Instead of validating the username after form submission, wouldn’t it be much friendlier if the form can validate itself from the server asynchronously in the background from a simple event such as on submit or unfocus event? In this post, I will be showing how you can the validate with Ajax using PHP/MySQL as your back-end. A table called user is created in the MySQL database which contains some dummy usernames. When user enters a username existed from this table, the form will prompt an error with message “Username already taken. Please try a different... Continue Reading
1


