...

View Full Version : sending email arrays with php



ppgpilot
01-25-2007, 04:46 PM
Greetings,

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!

David

Fumigator
01-25-2007, 06:52 PM
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'][0], $_POST['myListBox'][1], etc.

Bear in mind you MUST include empty square brackets in the name of your list box!


<select name="myListBox[]" multiple size="5">



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum