Mailing list

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
venom999
Forum Newbie
Posts: 3
Joined: Sat Apr 16, 2011 1:02 pm

Mailing list

Post by venom999 »

Im a beginner and I need a very simple php code for my very first mail list.

I created a database with the field 'mail'.
I have the admin html form with 'subject' and 'message' and send button of course...
And the form to get email addresses.

I know how to connect to my database and how to insert data into it

But i dunno actually how to send the email for those that are in my database, please give me a basic php code with no validation or css, thx. :)
fugix
Forum Contributor
Posts: 207
Joined: Fri Mar 18, 2011 8:01 pm

Re: Mailing list

Post by fugix »

use the mail() function
venom999
Forum Newbie
Posts: 3
Joined: Sat Apr 16, 2011 1:02 pm

Re: Mailing list

Post by venom999 »

Thanks, but I would like to see a sample code please?
fugix
Forum Contributor
Posts: 207
Joined: Fri Mar 18, 2011 8:01 pm

Re: Mailing list

Post by fugix »

venom999
Forum Newbie
Posts: 3
Joined: Sat Apr 16, 2011 1:02 pm

Re: Mailing list

Post by venom999 »

Cool, but how can I make php to 'load' all the e-mail addresses from my database?
fugix
Forum Contributor
Posts: 207
Joined: Fri Mar 18, 2011 8:01 pm

Re: Mailing list

Post by fugix »

you could probably use a while() loop to cycle through the addresses in your database yes
Post Reply