Jump to content


Form problems with multiple select box

  • Please log in to reply
1 reply to this topic

#1 JoeZ

  • Members
  • Pip
  • Newbie
  • 9 posts

Posted 28 February 2006 - 04:26 AM

I'm trying to use this to send email through a php script to multiple recipients. The problem is that when I use this, the values are resubmitted for each option. For example, if I select all three, the address generated will be

[a href=\"http://websiteurl.com/formmail.php?recipient=email1@sos.com&recipient=email2@sos.com&recipient=email3@sos.com\" target=\"_blank\"]http://websiteurl.com/formmail.php?recipie...=email3@sos.com[/a]

Instead, i want it to do this:

[a href=\"http://websiteurl.com/formmail.php?recipient=email1@sos.com\" target=\"_blank\"]http://websiteurl.com/formmail.php?recipient=email1@sos.com[/a], email2@sos.com, email3@sos.com

Here is a snippit

<form action="formmail.php" method=post>        <select name="recipient" size="3" multiple id="recipient">
                        <option value="email1@sos.com">User Name 1</option>
                        <option value="email2@sos.com">User Name 2</option>
                        <option value="email3l@sos.com">User Name 3</option>
<input type=submit></form>

Thanks for the help.

#2 doctor_james

  • Members
  • PipPipPip
  • Advanced Member
  • 40 posts

Posted 04 March 2006 - 01:09 PM

change the name property of your select element to this : name="recipient[]" .

hope it helps .

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users