PHP Form Mailer With DataBase Support

Posted on July 10, 2009
Filed Under General | 1 Comment

You know after having googled for an entire afternoon, I was unable to find a single opensource php form mailer script that would save form data to a MySQL database. Granted there are dozens of scripts that are super close but none that are quite the drop in and go easy to modify type I was seeking. Having need for this for many specialized situations over the years, my partner and I decided its time to build one as a GNU/GPL product that can easily be implemented into products like OpenRealty and WordPress or other types of products without the need for an add-on or plug-in of sorts. So, I now call this new freebie the PHP FormKit.

The PHP FormKit uses the PHPMailer Class, some AJAX, a MySQL Database, Session Token for anti spam, a little jQuery form validation and some basic documentation. Naturally as with all the plug-ins and add-ons we publish, this will be GNU/GPL and 100% free of charge. I have a few tiny bugs to work out and a few custom HTML styled templates to add for things like “Email a friend” or “Send me a copy” that will deliver a nice styled HTML email all of which is template based. Can you imagine adding this to your real estate website wherein someone selects “send to a friend” and they get a nice email with your logo, maybe your mug shot and a few featured listings. Yeah its that cool and you are free to style as you please, create forms as you please, no limitations as to appearance other than your own mind.

I’ll show you a quick (sort of old) example I have from a previous OpenRealty add-on we built about a year ago. First a little background on this because it helps articulate what we are doing in this project. The add-on was designed so that when the agents were added to the OR Database they could log in and select from an inventory of about 20 or so pre designed HTML templates that would simply provide a nice templated look to some basic correspondence features in the add-on. After the agent chose the template of their liking, any emails sent to visitors or those who query about a property would receive an HTML email with the agents photo, maybe a few featured listings and then the standard details already present in the OpenRealty database. Its a much nicer way to send emails in my personal opinion. The nice thing was that it worked with Yahoo, GMail and others that are notorious for stripping styles and other elements from HTML emails. I posted a single example of the type of HTML you could for example use. Its NOT beautiful, but it gives you an idea. http://www.jaredritchey.com/projects/formkitp/ I’m off to the races so to speak, with lots and lots of work to do but I’ll get this posted here shortly for download.

Comments

Leave a Comment

If you would like to make a comment, please fill out the form below.

Name (required)

Email (required)

Website

Comments

1 Comment so far
  1. beli July 22, 2009 12:59 pm

    I was also unable to find a opensource php form mailer script that would save form data to MySQL database. I will try your example and I hope it will do the job. Thanks.


TEMP CODE: GDHXCDX17249629