When integrated with a database, AJAX can accomplish some extremely powerful interactions that are unique to the set of languages it encompasses. “With great power comes great responsibility,” however, and database-integrated AJAX is no exception to this rule. To protect our database from unwanted requests, we need to have an interaction model that verifies the source of the request based on a password. In this article, we’ll cover how to create a password-protected AJAX request from the client side that’s verified on the server side before any database interactions occur. We’ll use PHP to create our unique passwords on the client side and also to verify them on the server when the AJAX requests are made.
InformIt, Written by Kris Hadlock, Published on Friday, September 1st, 2006