I am trying to build a php/mysql website. But in the past, i didn't like the way php handled insert, update, delete, showing of entries. Ever since I have seen AJAX implemented beautifully on so many sites, i want to be able to do the same?

I am familiar with how to use PHP to accomplish:

DB Insert, Edit, Delete, and show. But how can I do the same using AJAX? And how to show error messages and user-name availability live as well?