Jump to content

Form problems with multiple select box


Recommended Posts

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

[code]              
<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>
                      </select>
<input type=submit></form>[/code]


Thanks for the help.
Link to comment
https://forums.phpfreaks.com/topic/3723-form-problems-with-multiple-select-box/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.