Dynadot Aftermarket: discover domain gems worth investing in. Visit our aftermarket.

Drop Down Boxes In Forms...

SpaceshipSpaceship
Namecheap AuctionsNamecheap Auctions
Namecheap AuctionsNamecheap Auctions
Watch

martyn187

Established Member
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
Close
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
<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
Close
I'll give that a try, thanks Adam you're a star!
 
0
Close
DomainEasy: white label portfolios are live. Enable yours.

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com

NamePros updates

Filters for activity feeds
Your news feed, Latest activity, and the activity tab on profiles now have filter buttons: All, Posts, Quick replies, and Other. Your...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back