send email depending on select box

homam 12 Jul, 2011
hi
using 4.0 RC1.9 with joomla 1.6
i've built a contact form and the recipient determined using a select box like this :
<select size="1" class="" title="" type="select" name="input_select_2">
<option value="email1@gmail.com">   Option_1</option>
<option value="email2@hotmail.com">  Option_2</option>
</select>

------------------------------------
it work perfectly , but what i wanted to is
if the user selected Option_2 from the selectbox an email would be sent to "email1@gmail.com and [email]email2@hotmail.com[/email] "
i tried to achive that like this

<select size="1" class="" title="" type="select" name="input_select_2">
<option value="email1@gmail.com">   Option_1</option>
<option value="email2@hotmail.com , email1@gmail.com">  Option_2</option>
</select>


but it didn't work could you help me please
GreyHead 17 Jul, 2011
Hi homam,

I'm not sure why that does' work. Maybe the spaces between the emails are causing a problem.

You might want to try the methos from this post which avoids showing the emails in the page itself.

Bob
This topic is locked and no more replies can be posted.