Solved

Help creating a web form that emails the info

Posted on 2007-03-29
11
213 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

 

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: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

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 …
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…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses

628 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