Jump to content

Recommended Posts

Hi! i'm new on here and relativley new to php.

 

the problem i am faced with is i have a web page where people will select any number of checkboxes from 1-11 (more than one is allowed) and for each checkbox that is checked a pre-built html email brochure will be sent related to the selected checkbox. So there could be a minimum of none, with a maximum of 11 if they were to select all check boxes.

 

Currently i have a php script that passes the checkboxes from one page to another with the values of either "on" or "" (nothing). I need a script that pretty much says if deal1 == 'on' send deal1 email else nothing. I need this to cycle through 11 times.

 

If anyone can steer me in the right direction, show me an example of something similar that someone else has done, or provide any advice what so ever it would be very much appreciated.

 

Many thanks

Link to comment
https://forums.phpfreaks.com/topic/132381-send-multiple-pre-built-html-emails/
Share on other sites

Well, if it was me, I'd keep the prebuilt emails in a mysql database. If you have the subject line in one column, the message in another column, and headers in another column, all you would have to do is query the database for the specific emails you wish to send, and then loop through the rows, sending email as you go.

 

Doing this would also give you the chance to have a non-html column, because usually when you send html email, you will want to send a text version also.

 

If you will start putting together some code, and make a database, then when you get stuck we can help you. PHP is not like HTML, where you can easily copy and paste code and it will just work. You will need to learn. www.w3schools.com is a good place to learn, but the best stuff comes from books. I like the O'rielly book called "Programming PHP".

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.