/    Sign up×
Community /Pin to ProfileBookmark

Need help with a FORM script

Hi,
I am making a contact form in a new site.
One of the fields is a drop down menu with the subject of the message.
I need to make that ONLY if the subject is COntact Webmaster, then the recipient of the message will be my email address. All other subjects should go to the daulft email address.
But I can’t just set the values for each option with the email address that it should go, because I need the subject field on the email to have the subject and not the recipient email address.
Maybe, I made you confuse. Let me add, the form will send the info to aPHP script that will then send the email with the filled fields.
Is it easier to make a rule to change the recipient based on the subject in the HTML file, or in the PHP?
Do you now how to do that?
All I need is to have something like (in common writing)
if subject=contact webmaster
then
recipient==[email protected]
else
recipient==default@domain…

See what I mean? How can I do that?
Thanks for yout time…
Yan

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@pyroAug 10.2003 — Just do it in the PHP code. Basically, just do convert your pseudo-code to PHP, remembering that the matching operand is a double equal sign ( == ) not a single equal ( = ) and the operand to assign a value to a variable is a single equal sign...
×

Success!

Help @Skuba 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 6.17,
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: @nearjob,
tipped: article
amount: 1000 SATS,

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

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...