A simple example of an ajax contact form using php on the backend.  Clone this down to your htdocs and play around with it in your MAMP