Solved

Help creating a web form that emails the info

Posted on 2007-03-29
11
204 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
 

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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

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…
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…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

932 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now