PDA

View Full Version : Sending an email when submitting a form?


dianne1015
01-24-2003, 07:50 PM
I have this form for users to submit and am wondering how to send the submitter an automatic email thanking them for joining when they submit their info. Does this make sense? I guess basically I want the submit button to do two things, send them and email but also send me one.

Please, no need to pick on my coding, I know it's pathetic...I don't claim to know what I am doing...lol. Thanks a lot.

dianne1015


<form action="mailto:elist@rainwear.us" method="post" enctype="text/plain">
<font face="Verdana">
<input type="hidden" name="To" value="Work Force E-List"></font></b><font size="2" color="#000000" face="Verdana"><b>Your
Name&nbsp;</b> </font></td>
<td width="81%"><font face="Verdana"
size="2" color="#F0F4F8">&nbsp;<input type="text" name="Name" size="29" maxlength="100"></font></td>
</tr>
<tr>
<td width="32%" valign="middle" align="right"><b><font face="Verdana" size="2" color="#000000">Company Name&nbsp;</font></b></td>
<td width="81%"><font face="Verdana"
size="2" color="#F0F4F8">&nbsp;<input type="text" name="Company Name" size="29" maxlength="100"></font></td>
</tr>
<tr>
<td width="32%" valign="middle" align="right"><font face="Verdana" size="2"><b>Phone
Number&nbsp;</b></font></td>
<td width="81%"><font face="Verdana"
size="2" color="#F0F4F8">&nbsp;<input type="text" name="Phone Number" size="29" maxlength="100"></font></td>
</tr>
<tr>
<td width="32%" valign="middle" align="right"><b><font face="Verdana"
size="2" color="#000000">Email Address&nbsp; </font></b></td>
<td width="81%"><font face="Verdana"
size="2" color="#F0F4F8">&nbsp;<input type="text" name="Email Address" size="29" maxlength="100"></font></td>
</tr>
<tr>
<td width="32%" valign="top"></td>
<td width="81%"><font face="Verdana"><input type="submit" value="Submit"><input type="reset" value="Clear Form"></form>

beetle
01-24-2003, 08:33 PM
Javascript won't do that.

What server-side stuff does your webhost provide? PHP? CGI?

wontgetlost
01-24-2003, 10:12 PM
Okay, maybe not much help here but...
I'm presupposing you've already been able to work the form post and the sender can click and send you the note/email. Now you want the sender to receive a thanks for clicking "send". You'll need to create a file called "thanks.htm" or something similar and call for it from a hidden method:

<input type=hidden name="redir" value="http://www.yoursite.com/thanks.htm">

It works... as long as you've already gotten your email form to work.

You can check out my Reviews (http://www.littleariel.com/reviews.htm) page for a working example :)

dianne1015
01-24-2003, 10:34 PM
Not sure what my server provides...I will check.

As for that line of code...please pardon my ignorance but where exactly do I put that?

Thanks.
dianne1015

wontgetlost
01-25-2003, 03:24 AM
You would place it anywhere within the form.