Jump to content

Form problems with multiple select box


JoeZ

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/[email protected][email protected][email protected]\" target=\"_blank\"]http://websiteurl.com/[email protected][/a]

Instead, i want it to do this:

[a href=\"http://websiteurl.com/[email protected]\" target=\"_blank\"]http://websiteurl.com/[email protected][/a], [email protected], [email protected]

Here is a snippit

[code]              
<form action="formmail.php" method=post>        <select name="recipient" size="3" multiple id="recipient">
                        <option value="[email protected]">User Name 1</option>
                        <option value="[email protected]">User Name 2</option>
                        <option value="[email protected]">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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.