Call-911 Posted June 4, 2010 Share Posted June 4, 2010 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! Quote Link to comment https://forums.phpfreaks.com/topic/203906-email-users-with-specific-mysql-values/ Share on other sites More sharing options...
sKunKbad Posted June 4, 2010 Share Posted June 4, 2010 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. Quote Link to comment https://forums.phpfreaks.com/topic/203906-email-users-with-specific-mysql-values/#findComment-1068001 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.