artweb Posted March 13, 2009 Share Posted March 13, 2009 On my php part of my email form I have this: $to='bahbah@someone.com My question is if I want this email form to go to more that just one email how do I write that code? Quote Link to comment https://forums.phpfreaks.com/topic/149251-solved-how-to-send-my-email-form-to-more-than-one-email/ Share on other sites More sharing options...
JonnoTheDev Posted March 13, 2009 Share Posted March 13, 2009 mail("user@example.com, anotheruser@example.com", ........ Always check the php manual for usage of functions http://uk.php.net/manual/en/function.mail.php Quote Link to comment https://forums.phpfreaks.com/topic/149251-solved-how-to-send-my-email-form-to-more-than-one-email/#findComment-783757 Share on other sites More sharing options...
DyslexicDog Posted March 13, 2009 Share Posted March 13, 2009 you could loop through an array of email addresses. Do you want the email addresses to be posted on the same form? If so you could have the input be comma separated and use explode() to break them out into array members. Quote Link to comment https://forums.phpfreaks.com/topic/149251-solved-how-to-send-my-email-form-to-more-than-one-email/#findComment-783759 Share on other sites More sharing options...
artweb Posted March 13, 2009 Author Share Posted March 13, 2009 Thank you for your help. That's what I needed. Quote Link to comment https://forums.phpfreaks.com/topic/149251-solved-how-to-send-my-email-form-to-more-than-one-email/#findComment-783771 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.