Solved

Help creating a web form that emails the info

Posted on 2007-03-29
11
208 Views
Last Modified: 2010-04-25
I have created a contacts form.  When they click submit i want the information emailed to an email address.  The code of the form looks likes this:

                    <form name="form1" method="post" action="">
                      <table width="450" border="0" align="center">
                        <tr>
                          <td width="120">Contact Name: </td>
                          <td width="320"><input name="conname" type="text" id="conname" size="50"></td>
                        </tr>
                        <tr>
                          <td>Address:</td>
                          <td><input name="conadd" type="text" id="conadd" value="" size="50"></td>
                        </tr>
                        <tr>
                          <td>Email:</td>
                          <td><input name="email" type="text" id="email" size="60"></td>
                        </tr>
                        <tr>
                          <td>Phone:</td>
                          <td><input name="phone" type="text" id="phone" size="30"></td>
                        </tr>
                        <tr>
                          <td>Mobile:</td>
                          <td><input name="phone2" type="text" id="phone2" size="30"></td>
                        </tr>
                        <tr>
                          <td>Areas of Interest: </td>
                          <td><table width="390" border="0">
                              <tr>
                                <td class="style4"><div align="center" class="style17">
                                    <input type="checkbox" name="checkbox" value="checkbox">
                                  Modelling </div></td>
                                <td class="style4"><div align="center" class="style17">
                                    <input type="checkbox" name="checkbox2" value="checkbox">
                                  Acting</div></td>
                                <td class="style4"><div align="center" class="style17">
                                    <input type="checkbox" name="checkbox3" value="checkbox">
                                  Photography</div></td>
                              </tr>
                          </table></td>
                        </tr>
                        <tr>
                          <td colspan="2"><div align="center">About your Child </div></td>
                        </tr>
                        <tr>
                          <td>Name:</td>
                          <td><input name="conname2" type="text" id="conname2" size="50"></td>
                        </tr>
                        <tr>
                          <td>Gender:</td>
                          <td><select name="select">
                              <option>Male</option>
                              <option>Female</option>
                            </select>
                          </td>
                        </tr>
                        <tr>
                          <td>Age:</td>
                          <td><input name="phone22" type="text" id="phone22" size="15"></td>
                        </tr>
                        <tr>
                          <td>General Information </td>
                          <td><textarea name="textarea" cols="50" rows="3"></textarea></td>
                        </tr>
                        <tr>
                          <td colspan="2"><div align="center">
                              <label>
                              <input type="submit" name="Submit2" value="Submit">
                              </label>
                          </div></td>
                        </tr>
                      </table>
                    </form>

How do i change this form to email the form information to an email address when the submit button is clicked?

0
Comment
Question by:andrewl77
  • 3
  • 3
  • 3
  • +2
11 Comments
 
LVL 25

Expert Comment

by:Rouchie
ID: 18815541
You need a server-side language to do this (i.e. ASP, PHP, ASP.NET etc).  Can you tell us which language your server is configured to support?
0
 

Author Comment

by:andrewl77
ID: 18815592
The page is php....and server supports php.
0
 
LVL 25

Expert Comment

by:Rouchie
ID: 18815825
In that case you'd better wait for Jason to start work, as I'm your man for ASP.... ;-)  Sorry!
0
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 

Author Comment

by:andrewl77
ID: 18815865
Thats okay...what time/how long before that?  I am in melbourne and it is 11:30 pm!!!
0
 
LVL 25

Expert Comment

by:Rouchie
ID: 18815984
He's usually on around now, so shouldn't be long.  I *think* he's in LA (USA).
0
 
LVL 9

Expert Comment

by:fuzzboxer
ID: 18816718
There are plenty of form processors out there.  Check out any one of these:  http://www.hotscripts.com/PHP/Scripts_and_Programs/Form_Processors/index.html
0
 
LVL 8

Accepted Solution

by:
klykken earned 125 total points
ID: 18816943
In case someone is not giving full code, there's a tutorial for DW and PHP on sending form contents in email here:
http://www.dreamweaverclub.com/dreamweaver-php-form.php
0
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 18818633
Good morning.  For the record, I am in L.A. but I don't do early...

Hi andrewl77,

fuzzboxer and klykken both give good advice.  For some weird reason, Dreamweaver does not have an included form-to-email behavior, so you have to go third party.  While there are specific DW extensions out there to do this, they are generally paid extensions and not worth it when you consider how easy it is to do this.

klykken's link shows just how easy it is.  I would attempt to run with that tutorial and post back if you have questions

j
0
 

Author Comment

by:andrewl77
ID: 18820009
I have used Klykken's and yep...it was simple!

My only other question is how do i reformat the output into something pretty?

Results from form:

conname:              Andrew Little
conadd:               Some Road, Some Where
email:                
phone:                0400 98
phone2:               0400 988
checkbox:             checkbox
conname2:             Alicia
select:               Female
phone22:              6
textarea:             Test 1223
Submit2:              Submit
0
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 18820402
You'll need to learn a little about PHP in order to edit the script to pretty it up:

My first suggestion would be to use better fieldnames...
0
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 18825045
Nice pull, klykken...
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Suggested Solutions

Adobe Dreamweaver CS5 is a WYSIWYG web page editor that has advanced HTML, CSS, and Javascript rendering functionality and is probably the most well-known HTML editor available. Much of Dreamweaver's appeal centers around the Design View interfac…
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…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

685 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