/    Sign up×
Community /Pin to ProfileBookmark

PHP email form w/drop down selections

I have a very simple php email form, just text input fields. But now I’d like to add a drop down list. How do I go about this? Naming the list in the HTML file? php code?

to post a comment
PHP

9 Comments(s)

Copy linkTweet thisAlerts:
@pyroDec 30.2003 — Take a look at http://www.webdevfaqs.com/php.php#mailer - it loops through the entire $_POST array, making it very easy on you. ?
Copy linkTweet thisAlerts:
@caynadaauthorDec 30.2003 — Thanks for the link. Do you know if that server is having any problems? I can not seem to access it, keep getting server can not be found message.
Copy linkTweet thisAlerts:
@pyroDec 30.2003 — Yes, right now my server is down. Should (hopefully...better be... grrr... :o) be back up soon.
Copy linkTweet thisAlerts:
@caynadaauthorDec 30.2003 — Thanks very much for your help. I'll check on that link later on today. Best of luck with getting your server back up.
Copy linkTweet thisAlerts:
@pyroDec 30.2003 — Ok, sounds like a plan... It's actually just playing the waiting game, as the server is just a shared server. Just checked up on it, and apparently there is a network attack taking place... Hopefully it won't be down too long.
Copy linkTweet thisAlerts:
@caynadaauthorDec 30.2003 — Your server is back up and running, I like the site! Bare with me cause I'm new to PHP, but I can't seem to find the info about arrays. If I have a drop down with three selections ( a,b & c) how do I write the PHP code to display the viewers choice?
Copy linkTweet thisAlerts:
@pyroDec 30.2003 — Unless they can select multiple items out of the drop down, you just do it like this:

[code=php]echo $_POST['name_of_dropdown'];[/code]
Copy linkTweet thisAlerts:
@caynadaauthorDec 30.2003 — Yeah, they will only be able to select one item. Thanks very much for that, you've been a big help!
Copy linkTweet thisAlerts:
@pyroDec 30.2003 — You are very welcome. ?
×

Success!

Help @caynada 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.15,
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,
)...