Skip to main content

Ajax: Using $.Ajax() And .Click() jQuery Functions To Send Email With PHP

Posted on December 3, 2011 by Anthony James Founder/CEOAnthony James Founder/CEO

This screencast was created in response to a request from one of our viewers, and shows you how to create an extremely simple form that is driven by Ajax and PHP. We create an email and name field and pass the values of those inputs into a PHP file when a certain div tag is clicked. By using Ajax we are able to submit the form and send an email without the end user ever having to reload a webpage.

Download Source


Image of leo
9 years ago

Great site especially for people that suck at coding (like me 🙂 ).
I’d like to ask where exactly do you put the gmail address you mention in your tutorial that receives the mail form data.

Image of Anthony James Founder/CEO
Anthony James Founder/CEO
9 years ago

It will be in the mail() tag..

Image of Krishna
8 years ago

Port error: Could not establish connection. Receiving end does not exist.
I am getting that error, unable to send an email with that code…

Image of carl grainger
carl grainger
7 years ago

This was a good, simple intro but now jquery.min.js has moved on to 1.9.1 it no longer works. It would be great is this was updated 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *