Ajax Contact Form

Below is a simple way to use Ajax for a website contact form. I’ve created the full thing using one script (which can be added to any page using the php include function).

I’ll come back to this page in the near future to explain more about how the script hangs together - but if you have experience with PHP and JavaScript it will look pretty straightforward.

If you decide to use this - please note I have not fully tested this for bugs or security flaws, so use at your own risk.

Hopefully you can extend this to fit your own needs.

So here it is - just save it as ajax_contact.php and use: include ‘ajax_contact.php’; in you php file to have it work. (remember to update the email address!)







Name:
Email:
Subject:
Message:
Anti-bot check. Enter Digits '' below:
 

Here is a screenshot of the form:

Ajax Contact Form

Again - I will come back to this page and explain a bit more about how this script works.

Bad Behavior has blocked 1931 access attempts in the last 7 days.