Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Mar 2006
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    sending email arrays with php

    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

  • #2
    UE Antagonizer Fumigator's Avatar
    Join Date
    Dec 2005
    Location
    Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
    Posts
    7,691
    Thanks
    42
    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'][0], $_POST['myListBox'][1], etc.

    Bear in mind you MUST include empty square brackets in the name of your list box!
    Code:
    <select name="myListBox[]" multiple size="5">


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •