/    Sign up×
Community /Pin to ProfileBookmark

Sending email from form to other than to fixed email address

Hi

I have this field

<td><span class=red>Manager</span></td>
<td><select name=”manager”>
<option value=”[email protected]” SELECTED>Not Sure</option>
<option value=”[email protected]”>Jan Roberts</option>
<option value=”[email protected]”>Trevor Gilliver</option>
<option value=”[email protected]”>Andrea Castle</option>

Client would like the email to go to one of the above managers so

instead of

$emailTo = ‘[email protected];

I would like to modify it so he could do something like this

……

$emailTo = $manager’;

$emailSubject = “Maintenace Form”;

$emailBody = “name: $namen”
. “phone: $phonen”
. “address: $addressn”
. “mobile: $mobilen”
. “suburb: $suburbn”
. “email: $emailn”
. “postcode: $postcoden”
. “manager: $managern”
. “query: $queryn”
. “n”
. “”;

…….

That doesn’t work.

Any ideas anyone?

Cheers

Chris

to post a comment
PHP

2 Comments(s)

Copy linkTweet thisAlerts:
@BeachSideMay 21.2005 — Call the post variable manager

$emailTo = $_POST['manager']
Copy linkTweet thisAlerts:
@chrisginozauthorMay 21.2005 — Thanks Beachside

I'll give that try.

Cheers

Chris
×

Success!

Help @chrisginoz 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.21,
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,
)...