Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
Thread: sending email arrays with php
01-25-2007, 03:46 PM #1
- Join Date
- Mar 2006
- Thanked 0 Times in 0 Posts
sending email arrays with php
I need to allow my client to send emails to selected individuals using the CTRL CLICK selection method. This will place the email adresses into an array. No problem so far...
How do I then retrieve the info and send it with mail()?
I would use a loop but just how to construct the script is eluding me.
Any ideas / examples would be appreciated.
Thanks for your input!
01-25-2007, 05:52 PM #2
- Join Date
- Dec 2005
- Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
- Thanked 637 Times in 625 Posts
When a form contains a list box that can have multiple entries selected, then it passes all selections as an array, via $_POST or $_GET, based on the name of your list box. For example, if your list box is named myListBox, then you can refer to its values in PHP as $_POST['myListBox'], $_POST['myListBox'], etc.
Bear in mind you MUST include empty square brackets in the name of your list box!
Code:<select name="myListBox" multiple size="5">