Note: The is a rewrite from an earlier post (originally published Mar 8 , 2006). The original post has been replaced with this one.
One of the most common active feature a website is the contact form. I’m going to show you how to create a contact form using AJAX (without XML).
The complete AJAX contact form example will consist of four files. Below’s a brief description of these files.
- ajaxform.htm – The main HTML form code
- ajaxform.php – The PHP file which will take the submitted form data, email it and return a thank you message to the form.
- ajaxsettings.php – This is the file to configure the form
Here is a screen capture of how the form will appear (this is an image, not a function form!).
After you’ve had a chance to look through the above code, you should notice how things hang together.
Here’s a brief description of how it works.
[will update this soon]