epvc
asked on
Dreamweaver MX Submit To E-mail Button
Hello all,
I'm working on a site and am having an issue witht a Submit Button. Basically the setup is that I have a text box and I want users to type in their e-mail address and then click the submit button. I want that address to be seant to me via e-mail. Now I know my host accepts cgi and perl but i'm clueless to that so i was setting it up where when they hit the submit button it would pop up Outlook with my e-mail address already in the TO field. This works to a point but in the body it would put this:
Submit=Submit&textfield=te st%40petv. com.
Here is the html that I have:
<form name="form1" action="mailto:service@myd omain.com" method="post" >
<input type="submit" name="Submit" value="Submit">
<input type="reset" name="reset" value="Reset">
<input type="text" name="textfield">
First Question is. How do i get the body to be clear or at least have their e-mail address they typed in? Second, how easy is it to setup using CGI where the e-mail is just sent to me without opeining their Mail Client? Thanks for any help
I'm working on a site and am having an issue witht a Submit Button. Basically the setup is that I have a text box and I want users to type in their e-mail address and then click the submit button. I want that address to be seant to me via e-mail. Now I know my host accepts cgi and perl but i'm clueless to that so i was setting it up where when they hit the submit button it would pop up Outlook with my e-mail address already in the TO field. This works to a point but in the body it would put this:
Submit=Submit&textfield=te
Here is the html that I have:
<form name="form1" action="mailto:service@myd
<input type="submit" name="Submit" value="Submit">
<input type="reset" name="reset" value="Reset">
<input type="text" name="textfield">
First Question is. How do i get the body to be clear or at least have their e-mail address they typed in? Second, how easy is it to setup using CGI where the e-mail is just sent to me without opeining their Mail Client? Thanks for any help
ASKER
Is there a way from my HTML i am using to get the info they have typed into the form automatically put in the Body of the e-mail?
epvc,
This line is copied from the link I posted above
<p>
Your comments?<br>
<textarea name="comments" COLS=60 ROWS=8></textarea><br>
This is the part where the HTML pass the text to the email's body section
Vicker
This line is copied from the link I posted above
<p>
Your comments?<br>
<textarea name="comments" COLS=60 ROWS=8></textarea><br>
This is the part where the HTML pass the text to the email's body section
Vicker
ASKER
Ok I have that part...however when i test it I do have a text box which is great but when I click the SUBMIT Button the e-mail generates an e-mail and puts the right e-mail address which is great. the problem is with the text in the text box. It's not put in the body and this is what's put instead.
Submit=Submit&comments=tes t+message& textfield=
What i entered in the text box is "Test Message"
How do i get rid of the stuff around it from coming up in the body?
Submit=Submit&comments=tes
What i entered in the text box is "Test Message"
How do i get rid of the stuff around it from coming up in the body?
epvc,
can you use POST method instead of GET method?
Vicker
can you use POST method instead of GET method?
Vicker
ASKER
What's the difference between the two methods?
epvc,
GET
the parameters will pass to the next page through URL
i.e. &comments=test+message&tex tfield=
POST
the parameters will pass to the next page through the HTTP header
Vicker
GET
the parameters will pass to the next page through URL
i.e. &comments=test+message&tex
POST
the parameters will pass to the next page through the HTTP header
Vicker
ASKER
So as my current code is what should i change?
<tr>
<td width="185" height="46" valign="top">
<form name="form1" action="mailto:service@act ivenettech .com" method="post" >
<input type="submit" name="Submit" value="Submit">
<input type="reset" name="reset" value="Reset">
<input type="text" name="textfield">
</form></td>
<tr>
<td width="185" height="46" valign="top">
<form name="form1" action="mailto:service@act
<input type="submit" name="Submit" value="Submit">
<input type="reset" name="reset" value="Reset">
<input type="text" name="textfield">
</form></td>
epvc
Wait a minute
Do you mean that when you place something into the comment field and submit
You received a email with a body as follow?
Submit=Submit&comments=tes t+message& textfield=
Vicker
Wait a minute
Do you mean that when you place something into the comment field and submit
You received a email with a body as follow?
Submit=Submit&comments=tes
Vicker
ASKER
Yeah...so I have this text box with a submit button.
As a user i typed test message in the text box. Then clicked the submit button.
I received the e-mail but in the body it has Submit=Submit&comments=tes t+message& textfield= . I don't want that to be in the body when a user on the site clicks submit.
As a user i typed test message in the text box. Then clicked the submit button.
I received the e-mail but in the body it has Submit=Submit&comments=tes
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Ok that gets rid of the Submit=Submit&comments=tes t+message& textfield= and give me a blank body. Is there any easy way to get the data they put in the text box to automatically be used in the body of the e-mail? This is better though...i'd rather it be blank then have the other stuff.
epvc,
I need to check your cgi mail function before answering you this
Vicker
I need to check your cgi mail function before answering you this
Vicker
ASKER
Ok....not sure how to do that. Thanks though i think this will work for now.
Usually, we will simply use a hyperlink to send a email using Outlook
Say
<a href="mailto:service@mydom
If really want to send a email, as you say, have to use CGI, something like that
Please check the following tutorial, see if it suits you
http://www.mv.com/webtools/forms-info/form-submit-ex-em.html
Vicker