Solved

Help creating a web form that emails the info

Posted on 2007-03-29
11
207 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
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 

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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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

Suggested Solutions

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 …
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

840 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