Page 1 of 1

Mailing list

Posted: Sat Apr 16, 2011 1:12 pm
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. :)

Re: Mailing list

Posted: Sat Apr 16, 2011 1:52 pm
by fugix
use the mail() function

Re: Mailing list

Posted: Sat Apr 16, 2011 2:33 pm
by venom999
Thanks, but I would like to see a sample code please?

Re: Mailing list

Posted: Sat Apr 16, 2011 2:34 pm
by fugix

Re: Mailing list

Posted: Sun Apr 17, 2011 1:22 am
by venom999
Cool, but how can I make php to 'load' all the e-mail addresses from my database?

Re: Mailing list

Posted: Sun Apr 17, 2011 10:38 am
by fugix
you could probably use a while() loop to cycle through the addresses in your database yes