?
Solved

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

Posted on 2003-03-07
13
Medium Priority
?
173 Views
Last Modified: 2010-04-25
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!!
0
Comment
Question by:roblablob
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
  • 3
  • +1
13 Comments
 

Author Comment

by:roblablob
ID: 8087944
P.S. I also would like to know how to then redirect the user to a thank you page.
0
 
LVL 19

Accepted Solution

by:
webwoman earned 200 total points
ID: 8088548
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
 

Author Comment

by:roblablob
ID: 8088685
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
On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

 
LVL 19

Expert Comment

by:webwoman
ID: 8090410
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
 

Expert Comment

by:imaksBY
ID: 8092140
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
 
LVL 19

Expert Comment

by:webwoman
ID: 8092265
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
 

Expert Comment

by:imaksBY
ID: 8092299
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
 

Expert Comment

by:imaksBY
ID: 8092312
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
 
LVL 19

Expert Comment

by:webwoman
ID: 8092752
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
 

Expert Comment

by:imaksBY
ID: 8093774
ok, roblablob tell us what serverside do you have in exposal
0
 

Author Comment

by:roblablob
ID: 8093918
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
 
LVL 5

Expert Comment

by:zenlion420
ID: 9907821
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

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For those who don't know, Adobe Dreamweaver is a popular commercial web editor that enables you to design, build and manage complex websites. The editor is a WYSIWYG (What You See Is What You Get) web editor, which means that you can create your web…
This article is very specific and is only intended to help if you are installing Dreamweaver 8 in a Windows 7 environment with Office 2007 installed.   I'm not sure why Microsoft tends to release OS' that should not be released but they do.  Windows…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question