Newbie question: How do I get my form to submit to my email?

I have created a form in dreamweaver MX with several text fields, some radio buttons, and a browse field for a user to find a file on their hard drive.

I want the form to submit all this information. along with the file the user specified to my email address, how would I go about this?

I have heard that I need to use javascript when using the 'post' function on the form but I don't know how to apply it.

Please help!!
roblablobAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

roblablobAuthor Commented:
P.S. I also would like to know how to then redirect the user to a thank you page.
0
webwomanCommented:
Contact whoever hosts your site. THey most likely have a form handler you can use. Ask them how to use it -- you'll have to set your form up correctly for it to work.

Also, note well -- unless they have an upload component enabled, you're NOT going to be able to upload that file to your server. You CANNOT send an attachment using a form. You can ONLY UPLOAD it. Once it's uploaded you can do whatever you need to with the file on the server, but you CANNOT, no matter what you do, attach a file from a client to an email in one go.

Unless, of course, you forget the form and just have a mailto link, with instructions on what you want from the user. ;-)
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
roblablobAuthor Commented:
So, would it be possible to have two stages. One form to send the contects of the text boxes etc. to my email and then a seperate page where I could allow that person to upload a file to the server?
0
Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

webwomanCommented:
You could do it that way. You'll still need to contact your hosting company to find out what they allow and how to set up your forms.

What are you trying to do? It might just be easier to have a textarea where they can paste the file contents, or just open a mail window and let them do it however they want.
0
imaksBYCommented:
2 webwoman:
 1. You CAN upload files without any components installed. There's plenty of examples on web.
 2. You CAN upload file and attach it (if you know how to attach - i don't) in one go - you'll just have some troubles with extracting formfield names & values from multipart/form-data header.

2 roblablob:
you can use javascript on the page with your form only to validate form...
To redirect use:
ASP: Response.Redirect("http://somewhere")
PHP: header ("Location: http://somewhere");
0
webwomanCommented:
No, without a component of some kind, you can't upload AND get form data at the same time. You can upload without components, but it's not recommended -- it's not the best way, and it's very likely to crash the server if the files are large. PHP has upload components, ASP has third party components, but they're not installed by default.

Many hosting companies do NOT allow ANY anonymous uploads, for obvious reasons.
0
imaksBYCommented:
So you say that enctype="multipart/form-data" can only contain inputs of type File? You are not right - it can contain any other available controls - i dealed with this kind of stuff: created form for picture uploading together with some sender info and description. php whch received this form saved uploaded picture and updated database all-in-one. So i think that replacing DB update action with attaching file and sending email is not a problem.
But i must agree that componentless uploads on ASP is not a good practice for larger files... No, they won't crach server - script will be stopped as soon as ScriptTimeout exceeded.
Hosting without uploads suxxxx :)
0
imaksBYCommented:
So you say that enctype="multipart/form-data" can only contain inputs of type File? You are not right - it can contain any other available controls - i dealed with this kind of stuff: created form for picture uploading together with some sender info and description. php whch received this form saved uploaded picture and updated database all-in-one. So i think that replacing DB update action with attaching file and sending email is not a problem.
But i must agree that componentless uploads on ASP is not a good practice for larger files... No, they won't crach server - script will be stopped as soon as ScriptTimeout exceeded.
Hosting without uploads suxxxx :)
0
webwomanCommented:
With the right components or the right server side language/modules, you can handle both the file and the form data. But not without that.

And again -- they're using DW, and don't even know what the server has available. Not all servers will allow uploads, and  for good reason.

Before anything else, they need to contact their hosting service and find out what they have.
0
imaksBYCommented:
ok, roblablob tell us what serverside do you have in exposal
0
roblablobAuthor Commented:
yes i can use formail off the server using php to set the email settings and redirect url. So this has sort of solved my question. but another problem i have encountered is this: I have set up a php form which will upload to the server and everything works fine, but ive had to set the CHMOD settings to 777 ont the directory on the server, could this be a security risk?
0
zenlion420Commented:
This question has been classified as abandoned.  I will make a recommendation to the moderators on its resolution in approximately one week.  I would appreciate any comments by the experts that would help me in making a recommendation.

It is assumed that any participant not responding to this request is no longer interested in its final deposition.

If the asker does not know how to close the question, the options are here:
http://www.experts-exchange.com/help.jsp#hs5

zenlion420
EE Page Editor
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Adobe Dreamweaver

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.