Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

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

Posted on 2003-03-07
13
Medium Priority
?
174 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
  • 4
  • 4
  • 3
  • +1
12 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
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

 
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

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

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…
I still run into .cgi files every now and then. In some instances, I actually prefer the simplicity of a .cgi script to other options. Since I use DreamWeaver extensively, what I needed was a way to open .cgi scripts in Dreamweaver. And I wanted to …
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
The Relationships Diagram is a good way to get an overall view of what a database is keeping track of. It is also where relationships are defined. A relationship specifies how two tables connect to each other. As you build tables in Microsoft Ac…

581 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