/    Sign up×
Community /Pin to ProfileBookmark

how can i make form with various email address destinations?

i’m making a site for someone who has an existing form which works quite well. This is great for me as I don’t know javascript or php! However, he wants some changes & I don’t know how to do them.
He wants it so when the user selects from a ‘delivery destination’ dropdown menu, the country chosen is associated with a particular email address the query will go to.
As well as this, the email that is delivered needs to have a different title, such as ‘US Quote’ (it’s a global printing business).
An excerpt from what I have looks like this (on the form.htm, the select name=”{$recipientField}”) :

$recipientField=”Country”;
$recipients[“Australia”] = “[email protected]“;
$recipients[“US”] = “[email protected]“;

if( array_key_exists($recipientField, $_POST) ) {
$value = $HTTP_POST_VARS[$recipientField];

if( array_key_exists($value, $recipients) ) {
$recipient = $recipients[$value];
}
}

I would be grateful for any help!
K

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@FangMay 28.2007 — Ask in the PHP forum
×

Success!

Help @koi spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.28,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...