There is a typo in Line 13, It should be like this:
$MESSAGE_BODY .= "Job Category: ".nl2br($_POST["jobcategor
Change it and let me know how it works. If you get any error, post the error message here.
Main Topics
Browse All TopicsI've searched for this before with no help so I thought id post it.
I'm trying to send an email from a webpage.
The email goes to the desired address and lists in text what the user has entered on the form.
It seems to have problems with the dropdown menu on "Jobcategory".
Is anyone able to help?
Also. How do you make a "required" field on a form?
Thanks
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
So i did both.
I think it works, well the form actually comes up now but doesnt send the mail...
Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\xampp\htdocs\file.php on line 29
Failure
I tried to modify the php.ini file but it says that it's an invalid directory when its there....
Any help?
Maybe you could elaborate on what you mean when you say "it says that it's an invalid directory when its there"
You just have to set the port and server. If you can just locate the php.ini and search for "smtp" then uncomment and/or change the values you should be golden. I'm really not sure how xampp works, isn't there some kind of interface for making changes to the php.ini with xampp?
Business Accounts
Answer for Membership
by: jessegivyPosted on 2009-05-26 at 22:16:52ID: 24480032
It looks like you've got a parenthesis out of place, fixed below. There really shouldn't be any reason to call the nl2br function on anything but a textarea unless you're including newline characters in the value of the option tags. Did you want the integer value of the select to be displayed for job category in the email - or would it make more sense to show the string? If the string should appear, just adjust the values of the option tags. Let me know if you're still getting an error (and if so what error) off the job category in email.
Typically, form validation is a very accepted use of JavaScript. See the onsubmit event I've added to the form tag and add the javascript function (with script tags) to your <head> section. If you want to require additional fields you can simply add another condition to the validate function.
Select allOpen in new window