Jump to content

Recommended Posts

Hello all,

 

Sorry if this has been asked before, but I have tried searching here and Google and just can not find what I need.

 

Basically, I have a database that includes names, emails, and the amount they owe.

 

I would like to be able to send out a mass email to everyone in that database, and have it basically say:

 

"Hello <name>, you currently owe <amountdue>."

 

I can't figure out how to do this...

 

Any help would be great!!  or just a shove in the right direction to the proper tutorial! THanks!

Link to comment
https://forums.phpfreaks.com/topic/203906-email-users-with-specific-mysql-values/
Share on other sites

First you need to query the database, then check if a result was returned, then turn the result into an array so that you can use it. Loop through that array to go row by row through the result that was returned from your query. You would fill in the blanks of your email, and send it, then move on to the next iteration of the looping. Sending the email is very basic, and you will find almost unlimited tutorials on the internet about sending email in php.

 

If you don't understand this, you should read a beginner PHP/MySQL book, because this is the basics. It would be a good thing to learn as a simple first project because it involves a simple MySQL query, and using the result of the query in an emaiil.

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.