Dynadot

Drop Down Boxes In Forms...

Spaceship Spaceship
Watch
Impact
0
Hi,

I am looking for a way, where selecting a different option from a drop down box, will mean that the form is sent to a different e-mail address.

At the moment, it is an html form, sent using a PHP file at the following URL http://www.uckfieldfm.co.uk/contact/index.htm

Any suggestions or ideas welcome, or do those 2 words both mean the same thing ????
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
<select name="address">
<option value="[email protected]">[email protected]</option>
<option value="[email protected]">[email protected]</option>
<option value="[email protected]">[email protected]</option>
</select>

have your menu set out like this

then in your php file

you need to post it so add this near the top of your page

$email = $_POST['address'];

you then need to edit your mail function in the php code

should look something similar to this
mail($email,$subject,$message);

on the first section of the mail function (anything after the ( but before the first ,)

change that to $email

it then should work :)

or if you want to evade any risk of spam bots you could use an array :)
 
0
•••
I'll give that a try, thanks Adam you're a star!
 
0
•••
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back