You would need...
1. backend php script - which validates usernames/checks availability by doing database queries to MySQL
2. frontend page - registration page like you're looking for
3. frontend javascript - handlers for the forms on your page that call the backend and process the results to give the user a message
Which part/s do you know/need to learn in particular? We could probably be more helpful if we knew which parts of the process you wanted to learn more about.
Also, you may be better off using a prebuilt library on both the php and the javascript end, as commonly used things such as AJAX requests are commonly provided by libraries already. This saves you the hassle of dealing with the browsers and such.
Comment/Reply (w/o sign-up)