-
-
SitePoint.com has published my article entitled Use AJAX and PHP to Build your Mailing List, which walks you through the development of a simple system that allows your visitors to sign up for a mailing list stored in a MySQL database without having to refresh or leave the page. I use Prototype to send an Ajax call to a PHP script to store the address and return a success or failure message to the HTML page. It’s a very simple approach, but you’ll need to know a bit about PHP and JavaScript to grasp the details. A working example of the script is included to help illustrate how it works.
A very useful improvement to this script would be to tie into a mailing list management system via an API, which would allow you to store addresses to a system where you can later send HTML emails to your audience and track views, clicks and other important data. The system I use is Mail Chimp, which has a nice PHP class that makes tying into their API easy.
-
-