Contact forms in dreamweaver

I wondering if I could get some guidance on building contact forms in dreamweaver.

Forms are the easy part.  It's just HTML5 code.
Making HTML5 Forms in DW CC (video)
http://tv.adobe.com/watch/learn-dreamweaver-cc/html5-forms-workflow/
Form processing scripts are a bit more complex.  Start by asking your hosting provider if they have scripts you can use.  If not, find out which server-side programming languages are supporting by your plan -- php, asp.net, perl, cold fusion, etc...  This will narrow your search to the scripts you can use on your server.
Formm@ailer PHP from DB Masters
http://dbmasters.net/index.php?id=4
Tectite
http://www.tectite.com/formmailpage.php
Forms to Go from Bebosoft (script generating software)
http://www.bebosoft.com/products/formstogo/overview/
Wufoo.com (on-line form service)
http://wufoo.com/
Nancy O.

Similar Messages

  • Creating a modern Contact Form in Dreamweaver or use an addon

    Hi
    I am looking for an easy way to create a modern contact form in Dreamweaver using and addon also will be fine
    Any ideas?
    I wan to create fields:
    Email:
    Drop down: with 3 options
    Simple text box
    Notes:
    Submit button
    Thanks

    Making HTML5 Forms in DW CC (video)
    http://tv.adobe.com/watch/learn-dreamweaver-cc/html5-forms-workflow/
    Making the HTML form is easy but the form processing script which collects data & sends it to your email is not quite so simple.   Start with your web host.  Ask them if they have form-to-email processing scripts you can use.  If they don't, find out which scripts your hosting plan supports (php, asp, asp.net, perl, coldfusion, etc...)
    Nancy O.

  • I have created a contact form using dreamweaver cc...how do i get it to send to my email?

    how do i get the contact form to send to my email?
    here is my code in html:
    <section id="content">
      <div class="main">
      <div class="container_12">
      <div class="wrapper">
      <article class="grid_8">
      <div class="indent-left">
      <h3 class="p0">Contact Form</h3>
      <form id="contact-form" method="post" enctype="multipart/form-data">
      <fieldset>
       <label><span class="text-form">Your Name:</span><input type="text"></label>
       <label><span class="text-form">Your Email:</span><input type="text"></label>
       <div class="wrapper">
      <div class="text-form">Your Message:</div>
      <div class="extra-wrap">
      <textarea></textarea>
      <div class="clear"></div>
      <div class="buttons">
      <a class="button" href="#" onClick="document.getElementById('contact-form').reset()">Clear</a>
      <a class="button" href="#" onClick="document.getElementById('contact-form').submit()">Send</a>
      </div>
      </div>
       </div>
      </fieldset>
      </form>
      </div>
      </article>
    my CSS code:
    #contact-form {
      display:block;
      width:100%;
      #contact-form label {
      display:block;
      height:35px;
      overflow:hidden;
      #contact-form input {
      float:left;
      width:443px;
      font-size:12px;
      line-height:1.25em;
      color:#808080;
      padding:7px 9px;
      margin:0;
      font-family:Arial, Helvetica, sans-serif;
      border:1px solid #dcdcdc;
      background:#fff;
      outline:none;
      #contact-form textarea {
      float:left;
      height:183px;
      width:443px;
      font-size:12px;
      line-height:1.25em;
      color:#808080;
      padding:7px 9px;
      margin:0;
      font-family:Arial, Helvetica, sans-serif;
      border:1px solid #dcdcdc;
      background:#fff;
      overflow:auto;
      outline:none;
    .text-form {
      float:left;
      display:block;
      font-size:13px;
      line-height:18px;
      width:96px;
      color:#808080;
      font-family:Arial, Helvetica, sans-serif;
    .buttons {padding:8px 30px 0 0; text-align:right;}
    .buttons a {margin-left:6px;}
    aside {
      width:100%;
      padding:40px 0 30px;
      background:#fff;
    .title-2 {
      display:block;
      padding-left:20px;
      font-size:21px;
      line-height:43px;
      color:#fff;
      background:#1c1b18;
      margin-bottom:16px;

    <form action="path-to-script-on-server/form-to-email-script.php">
    If your host doesn't provide scripts, ask them which server-side languages you can use (php, asp, asp.net, perl, coldfusion, etc...).  This will narrow your search for form-to-email processing scripts.
    Also, your form SUBMIT button is not properly coded.  It should look something like this.
    <input type="submit" name="send" id="send" value="Submit">
    RESET buttons aren't used much anymore because they lead to more form submission failures than successes.  You don't need it.
    Please review HTML5 Forms:
    Understanding HTML5 intelligent forms – Part 1: New input elements | Adobe Developer Connection
    HTML5 forms workflow | Learn Dreamweaver CC | Adobe TV
    Nancy O.

  • How Can I Create A Contact Form In Dreamweaver Using ASP

    I tried to create a contact form using php, but that failed epically. The server doesn't support php, and there isn't anything I can do about that. My only option now is to create it using ASP but I can't find a good tutorial on how to do so. Please help me!

    Ask your host if they have a form-to-email script you can use.  Many commercial hosts have scripts on their servers which you can activate through your C- or Admin-panel.
    Failing that, there are some commercial products you can use.
    Forms to Go ~
    http://www.bebosoft.com/products/formstogo/overview
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists 
    http://alt-web.com/
    http://twitter.com/altweb

  • Contact Form in DreamWeaver or  Muse Help ?

    Anyone want to help out in building a custom contact form ?

    I want to make a contact form and have it sent to my email at my hosting company. Do you work for Adobe ?
    Have a good day !

  • Creating Contact Form in Dreamweaver

    I'm using dreamweaver 8 and am trying to create a simple
    Contact Us form for my homepage. How do I do this? Just need a form
    that users fill in with Name, Address, email, etc. Need to be able
    to capture this data. Help.

    The information here may be of some help:
    http://www.dreamweaverresources.com/tutorials/styled_form.htm
    Nadia
    Adobe® Community Expert : Dreamweaver
    Tutorials |SEO |Templates
    http://www.DreamweaverResources.com
    http://www.perrelink.com.au
    CSS Tutorials for Dreamweaver
    http://www.adobe.com/devnet/dreamweaver/css.html
    "newby_newby" <[email protected]> wrote in
    message
    news:ep41ht$eev$[email protected]..
    > I'm using dreamweaver 8 and am trying to create a simple
    Contact Us form
    > for my
    > homepage. How do I do this? Just need a form that users
    fill in with
    > Name,
    > Address, email, etc. Need to be able to capture this
    data. Help.
    >

  • I created a contact form in dreamweaver but it doesn't work

    <form id="form1" name="form1" method="post" action="mailto:myemailaddress">
      <table width="518" border="0">
        <tr>
          <td width="88"><div align="left">name</div></td>
          <td width="216"><input name="textfield" type="text" id="textfield" size="30" /></td>
          <td width="200"><label for="textfield"></label>
            <div align="left"></td>
        </tr>
        <tr>
          <td><div align="left">email</div></td>
          <td><input name="textfield2" type="text" id="textfield2" size="30" /></td>
          <td><p align="right">
            <label for="textfield2"></label>
            </td>
        </tr>
        <tr>
          <td height="30"><div align="left">subject</div></td>
          <td><input name="textfield3" type="text" id="textfield3" size="30" /></td>
          <td><label for="textfield3"></label>
            </td>
        </tr>
        <tr>
          <td height="59"><div align="left">comments</div></td>
          <td><textarea name="textarea" id="textarea" cols="30" rows="5"></textarea>
            <div align="left"></div></td>
          <td><div align="right"></div></td>
        </tr>
    </table>
      <p>
        <input type="submit" value="send" />
        <input type="reset" name="Reset" id="button" value="clear" />
      </p>
    </form>

    Using email addresses in forms is a) not very reliable, b) a good way to get spammed.
    You need a form-to-email processing script. Preferably one which conceals your e-mail address from harvesters and has built-in spam prevention.
    Contact your web host and ask them if they have one you can use.  Often hosts load scripts on their servers which you can activate through your Admin Panel or by referencing the script in your form's action attribute.
         <form action="path-to-script-on-server/form-to-email-script.php">
    If your host doesn't provide scripts, ask them which server-side languages you can use (php, asp, asp.net, perl, coldfusion, etc...).
    Related Links:
        Formm@ailer PHP from DB Masters
        http://dbmasters.net/index.php?id=4
        FormToEmail.com (free & pro versions available)
        http://formtoemail.com/formtoemail_pro_version.php    
        Tectite
        http://www.tectite.com/formmailpage.php
        Forms to Go from Bebosoft (script generating software)
        http://www.bebosoft.com/products/formstogo/overview/
        Wufoo.com (on-line form service)
        http://wufoo.com/
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists 
    http://alt-web.com/

  • Contact form in dreamweaver

    Hi guys
    How can i make my form submit its info to an email address without using php.

    http://www.quirksmode.org/js/forms.html
    That looks like it might be helpful.
    Martin

  • My contact form is not working.

    Here is my html code for my contact form which is located in Contact.htm :
    <form method="POST" action="contact.php">
    <p>Name:<br>
    <input type="text" name="Name:">
    <p>Company:<br>
    <input type="text" name="Company:">
    <p>Phone:<br>
    <input type="text" name="Phone:">
    <p>Email:<br>
    <input type="text" name="Email:">
    <p>Comments:<br>
      <textarea name="Comments:" cols="45" rows="5"></textarea>
    <p><input type="submit" name="submit" value="Submit">
    </form>
    Here is my code which is located in my php file contact.php :
    <?php
    mb_http_input("UTF-8");
    mb_http_output("UTF-8");
    $EmailFrom = Trim(stripslashes($_POST['EmailFrom']));
    $EmailTo = "[email protected]";
    $Subject = "Web Contact Form";
    $Name: = Trim(stripslashes($_POST['Name:']));
    $Company: = Trim(stripslashes($_POST['Company:']));
    $Phone: = Trim(stripslashes($_POST['Phone:']));
    $Email: = Trim(stripslashes($_POST['Email:']));
    $Comments: = Trim(stripslashes($_POST['Comments:']));
    $validationOK=true;
    if (Trim($EmailFrom)=="") $validationOK=false;
    if (!$validationOK) {
      print "<meta http-equiv=\"refresh\" content=\"0;URL=error.htm\">";
      exit;
    $Body = "";
    $Body .= "Name:: ";
    $Body .= $Name:;
    $Body .= "\n";
    $Body .= "Company:: ";
    $Body .= $Company:;
    $Body .= "\n";
    $Body .= "Phone:: ";
    $Body .= $Phone:;
    $Body .= "\n";
    $Body .= "Email:: ";
    $Body .= $Email:;
    $Body .= "\n";
    $Body .= "Comments:: ";
    $Body .= $Comments:;
    $Body .= "\n";
    $success = mail($EmailTo, $Subject, $Body, "From: <$EmailFrom>");
    if ($success){
      print "<meta http-equiv=\"refresh\" content=\"0;URL=ok.htm\">";
    else{
      print "<meta http-equiv=\"refresh\" content=\"0;URL=error.htm\">";
    ?>
    The error I get when I submit the information on the form is:
    Parse error: syntax error, unexpected ':' in D:\Hosting\5199406\html\contact.php on line 8
    Line 8 = $Name: = Trim(stripslashes($_POST['Name:']));
    I actually took this line out to see if it would work and then it gave me an error that Line 9 was not working...
    HELP PLEASE!

    Hello,
    Please try to read this tutorial hoping it may help
    Creating a Contact form in Dreamweaver from scratch
    In this tutorial we will build a contact form with Dreamweaver CS3 from scratch, our application consists of 2 pages, The first page contains the contact form, and the second page contains the form submission action and the thank you message. Also we will use Dreamweaver form validation behavior to validate the form. The Validate Form behavior checks the contents of specified text fields to ensure that the user has entered the correct type of data.
    Best Regards
    Waleed Barakat
    Developer-Online Creator and programmer

  • How to create a contact form and forward to my email

    I have attempted to createa contact form in dreamweaver, and follow many other tutorial createa contact.php file and test on the form page, but receive no email.  not sure where the problem lies.  can someone help or put me on the right direction. a step by step guide will be greatly appreciated.
    P.S. I'm hosted my website with godaddy.com, using dreamweaver cs5 on windows 7 64bit and IE8.
    thank you all in advance.

    I have attempted to createa contact form in dreamweaver, and follow many other tutorial createa contact.php file and test on the form page, but receive no email.  not sure where the problem lies.  can someone help or put me on the right direction. a step by step guide will be greatly appreciated.
    Might be easier if you paste the code here to show us what you've done so far.

  • Why don't messages deliver from Contact form

    I have just concluded moving a WordPress website from the /blog (www. kenapexvision. com/blog) sub directory back to the root directory (www. kenapexvision. com) of the site. Before now, I had built the contact form using Dreamweaver (spry validation). I adjusted the positioning of the fields for better page display from WordPress dashboard and cleaned up the "hints" and "spry validation" messages since they won't work on WordPress and then I set it up using formmail.php script. I also used a "thank you" page in the (formmail.php) script which I had hidden using "PC Hide page" plugin.
    Everything worked perfectly fine while the site was in the /blog sub folder until I moved all the content of the /blog folder to the root direct. Now every other thing is working perfectly fine - the pages and all other links, including display of the "thank you" page - after comment submission. However the message doesn't deliver to the email addresses set up in the formmail.php script.
    Please what could be the reason for this? I could use a contact form plugin as suggested by someone, but I want to use this method (formmail script) until I fully understand how the contact form plugins work.
    Please I need an urgent assistance on what could be the reason why messages aren't delivering from the contact form and how I could correct it.
    Thank you

    Yes, here is the link.
    http://www.kenapexvision.com/?page_id=376

  • Contact form, how to hide text and show hints?

    I want to create a contact form, using Dreamweaver. In the preview it looks allright. But when uploading, I get the following problems:
    The "hints" inside the boxes are missing, nomatter what browser I use.
    The text "A value is required" (for example) is visible all the time. It should only be visible if people enter and leave the box blank.
    And I just saw that it doesn't respect my font either, only in the preview mode.
    Preview:
    Uploaded (bad!):
    <form id="form1" name="form1" method="post" action="formmail.php">
      <span id="nameTextField">
      <label for="name">Name</label> <br />
      <input type="text" name="name" id="name" tabindex="10" />
      <span class="textfieldRequiredMsg">A value is required.</span></span>
      <p><span id="emailTextField">
      <label for="email">Email</label><br />
      <input type="text" name="email" id="email" tabindex="20" />
      <span class="textfieldRequiredMsg">A value is required.</span><span class="textfieldInvalidFormatMsg">Invalid format.</span></span></p>
      <p><span id="messageTextArea">
      <label for="message">Message</label> <br />
      <textarea name="message" id="message" cols="75" rows="8" tabindex="30"></textarea>
      <span id="countmessageTextArea"> </span><span class="textareaRequiredMsg">A value is required.</span><span class="textareaMinCharsMsg">Minimum number of characters not met.</span><span class="textareaMaxCharsMsg">Exceeded maximum number of <br />
      characters.</span></span></p>
      <label for="submit"></label>
      <input type="submit" name="submit" id="submit" value="Submit" tabindex="40" />
    </form>
    <script type="text/javascript">
    <!--
    var sprytextfield1 = new Spry.Widget.ValidationTextField("nameTextField", "none", {validateOn:["blur"], hint:"Your name"});
    var sprytextfield2 = new Spry.Widget.ValidationTextField("emailTextField", "email", {hint:"Your email", validateOn:["blur"]});
    var sprytextarea1 = new Spry.Widget.ValidationTextarea("messageTextArea", {minChars:1, maxChars:999, counterType:"chars_remaining", counterId:"countmessageTextArea", validateOn:["blur"], hint:"Your message"});
    //-->
    </script>

    Did you upload your Spry assets folder and CSS files to your remote server?
    Can you provide a link to your problem page?
    Nancy O.

  • Forms central and dreamweaver CS6 - trouble with contact form

    So I'm a noob. I created a simple one-column layout in DW CS6 and cannot seem to get this Forms Central contact form template to align correctly. I'm sure it is something simple (CSS related). Any help would be appreciated. It is inserted in the beginning of the body tag - here take a look.
    -->
    </style></head>
    <body>
    <script type="text/javascript" src="https://formscentral.acrobat.com/Clients/Current/FormsCentral/htmlClient/scripts/adobe.for m.embed.min.js"></script>
    <script type="text/javascript">;ADOBEFORMS.EmbedForm({formId:"Tdaq4TZp4ArEoczwH3UmuQ"});</script>
    <div class="container">
      <div class="header"><a href="#"><img src="" alt="Insert Logo Here" name="Insert_logo" width="180" height="90" id="Insert_logo" style="background-color: #C6D580; display:block;" /></a>
        <!-- end .header --></div>
      <div class="content">
        <h1>Instructions</h1>
        <p>Be aware that the CSS for these layouts is heavily commented. If you do most of your work in Design view, have a peek at the code to get tips on working with the CSS for the fixed layouts. You can remove these comments before you launch your site. To learn more about the techniques used in these CSS Layouts, read this article at Adobe's Developer Center - <a href="http://www.adobe.com/go/adc_css_layouts.http://www.adobe.com/go/adc_css_layouts">http://www.adobe.com/go/adc_css_layouts</a>.</p>
        <h2>Layout</h2>
        <p>Since this is a one-column layout, the .content is not floated. </p>
        <h3>Logo Replacement</h3>
        <p>An image placeholder was used in this layout in the .header where you'll likely want to place  a logo. It is recommended that you remove the placeholder and replace it with your own linked logo. </p>
        <p> Be aware that if you use the Property inspector to navigate to your logo image using the SRC field (instead of removing and replacing the placeholder), you should remove the inline background and display properties. These inline styles are only used to make the logo placeholder show up in browsers for demonstration purposes. </p>
        <p>To remove the inline styles, make sure your CSS Styles panel is set to Current. Select the image, and in the Properties pane of the CSS Styles panel, right click and delete the display and background properties. (Of course, you can always go directly into the code and delete the inline styles from the image or placeholder there.)</p>
        <!-- end .content --></div>
      <div class="footer">
        <p>Footer</p>
        <!-- end .footer --></div>
      <!-- end .container --></div>
    </body>
    </html>

    Hi,
      Try to insert the embed code inside one of your <div> tags say the div-content tag after your <p>..</p> tags.
    The embed code should work inside <div> ... </div> tags according to the layout defined there.
    Thanks,
    Lucia

  • Contact form-checkbox PHP coding doesnt work

    I am a beginner to web page design so i would be grateful if you can explain to me what PHP coding i would need for 'Checkbox' and where to place it in the PHP coding below. I can submit the form to my email with all the headings and the filled in forms with checkbox Yes or No.
    Only problem i have is that part of the check box info appear right at the top of the email message rather than the 'Name', 'Tel', 'Email' etc..Another half of the checkbox appear where it suppose to be wih double heading as shown below. I would also like to remove the <br> from the email message. Can you also tell me how to change the colour for heading so its clear.
    I have marked the checkbox code in BLUE for both HTML and PHP coding below. Sorry for the long coding. Look forward to hearing from someone. Much appreciated.
    Message delivered to the email address as received:
    Rear ground extension: Yes
    Two-storey rear extension: Yes
    Two-storey side extension: No
    Loft: Yes
    New Build: Yes
    Other: Yes
    Name: Test<br>
    Email: [email protected]<br>
    Contact No: 87576as<br>
    Address1: addy1<br>
    Address2: addy2<br>
    Town: town<br>
    County: county<br>
    Postcode: post<br>
    Property Type: Cottage<br>
    Property Area: None<br>
    Message:<br>
    test msg
    My HTML coding for the form:
    <div class="contactForm">
          <form id="form1" name="form1" method="post" action="test2.php">
            <fieldset>
              <legend><strong>Personal Information</strong></legend>
              <table width="690" border="0">
                <tr>
                  <td width="340"><p>
                <label for="name" class="contactLable">Name:</label>
                <input name="name" type="text" id="name" tabindex="10" size="30" />
              </p></td>
                  <td width="340"><p>
                <label for="contact_number" class="contactLable">Contact No:</label>
                <input name="contact_number" type="text" id="contact_number" tabindex="20" size="30" />
              </p></td>
                </tr>
              </table>
              <table width="690" border="0">
                <tr>
                  <td><p>
                <span id="sprytextfield1">
                <label for="email" class="contactLable">Email:</label>
                <input name="email" type="text" id="email" tabindex="30" size="30" />
              <span class="textfieldRequiredMsg">A value is required.</span><span class="textfieldInvalidFormatMsg">Invalid format.</span></span> </p></td>
                </tr>
              </table>
            </fieldset>
            <fieldset>
              <legend><strong>Project Information</strong></legend>
              <p><table width="690" border="0">
      <tr>
        <td width="340"><p>
                <label for="address1" class="contactLable">Address 1:</label>
                <input name="address1" type="text" id="address1" tabindex="40" size="30" />
              </p></td>
        <td width="340"> <p>
                <label for="address2" class="contactLable">Address 2:</label>
                <input name="address2" type="text" id="address2" tabindex="50" size="30" />
              </p></td>
      </tr>
      <tr>
        <td><p>
                <label for="town" class="contactLable">Town:</label>
                <input name="town" type="text" id="town" tabindex="60" size="30" />
              </p></td>
        <td><p>
                <label for="county" class="contactLable">County:</label>
                <input name="county" type="text" id="county" tabindex="70" size="30" />
              </p></td>
      </tr>
      <tr>
        <td><p>
                <label for="postcode" class="contactLable">Post Code:</label>
                <input name="postcode" type="text" id="postcode" tabindex="80" size="10" />
              </p></td>
        <td> </td>
      </tr>
      <tr>
        <td><p>
                <label for="propertyType" class="contactLable">Property Type:</label>
                <select name="propertyType" id="propertyType" tabindex="90">
                  <option>Please select</option>
                  <option>Detached</option>
                  <option>Semi-Detached</option>
                  <option>End of Terrace</option>
                  <option>Mid-Terrace</option>
                  <option>Flat</option>
                  <option>Bungalow</option>
                  <option>Cottage</option>
                  <option>Other</option>
                </select>
              </p></td>
        <td><p>
                <label for="propertyArea" class="contactLable">Property Area:</label>
                <select name="propertyArea" id="propertyArea" tabindex="100">
                  <option>Please select</option>
                  <option>None</option>
                  <option>Listed Building</option>
                  <option>Conservation Area</option>
                </select>
              </p></td>
      </tr>
    </table>
    </p>
           </fieldset><fieldset><legend><strong>Project Type</strong></legend>
              <table width="690">
                <tr>
                  <td width="338"><label>
                    <input name="rearExt" type="checkbox" class="contactCheckbox" id="CheckboxGroup1_0" tabindex="110" value="rearExt"/>
                  Rear ground extension</label></td>
                  <td width="340"><input name="sideExt" type="checkbox" class="contactCheckbox" id="CheckboxGroup1_1" tabindex="120" value="sideExt"/>
    Side ground extension</td>
                </tr>
                <tr>
                  <td><input name="twoStoreyRear" type="checkbox" class="contactCheckbox" id="twoStoreyRear" tabindex="130" value="twoStoreyRear"/>
    Two-storey rear extension</td>
                  <td><input name="twoStoreySide" type="checkbox" class="contactCheckbox" id="twoStoreySide" tabindex="140" value="twoStoreySide"/>
    Two-storey side extension</td>
                </tr>
                <tr>
                  <td><input name="loft" type="checkbox" class="contactCheckbox" id="loft" tabindex="150" value="loft"/>
    Loft conversion </td>
                  <td><input name="newBuild" type="checkbox" class="contactCheckbox" id="newBuild" tabindex="160" value="newBuild"/>
    New build </td>
                </tr>
                <tr>
                  <td><input name="flat" type="checkbox" class="contactCheckbox" id="flat" tabindex="170" value="flat"/>
    Flat conversion</td>
                  <td><input name="other" type="checkbox" class="contactCheckbox" id="other" tabindex="180" value="other"/>
    Other conversion</td>
                </tr>
              </table>
            </fieldset>
            <fieldset><legend><strong>Message</strong></legend>
              <p>
                <label for="message" class="contactLable">Your Message or Comments:</label>
                <textarea name="message" id="message" cols="45" rows="5" tabindex="190"></textarea>
              </p>
            </fieldset>
            <br />
            <input type="submit" name="Sumbit" id="Sumbit" value="Submit" tabindex="200" />
          </form>
        </div>
    PHP Coding to send to my email:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <META HTTP-EQUIV="refresh" content="0;URL=thankyou.html">
    <title>Email Form</title>
    </head>
    <body>
    <?php
      $name=addslashes($_POST['name']);
      $contact_number=addslashes($_POST['contact_number']);
      $email=addslashes($_POST['email']);
      $address1=addslashes($_POST['address1']);
      $address2=addslashes($_POST['address2']);
      $town=addslashes($_POST['town']);
      $county=addslashes($_POST['county']);
      $postcode=addslashes($_POST['postcode']);
      $propertyType=addslashes($_POST['propertyType']);
      $propertyArea=addslashes($_POST['propertyArea']);
      $rearExt=($_POST['rearExt'])?"Rear ground extension: Yes":"Rear ground extension: No";
      $sideExt=($_POST['sideExt'])?"Side ground extension: Yes":"Side ground extension: No";
      $twoStoreyRear=($_POST['twoStoreyRear'])?"Two-storey rear extension: Yes":"Two-storey rear extension: No";
      $twoStoreySide=($_POST['twoStoreySide'])?"Two-storey side extension: Yes":"Two-storey side extension: No";
      $loft=($_POST['loft'])?"Loft: Yes":"Loft: No";
      $newBuild=($_POST['newBuild'])?"New Build: Yes":"New Build: No";
      $flat=($_POST['flat'])?"Flat: Yes":"Flat: No";
      $other=($_POST['other'])?"Other: Yes":"Other: No";
      $msg.="\n$rearExt\n$wsideExt\n$twoStoreyRear\n$twoStoreySide\n$loft\n$newBuild\n$wflat\n$ other";
      $message=addslashes($_POST['message']);
    // you can specify which email you want your contact form to be emailed to here
      $toemail = "[email protected]";
      $subject = "From Website Test";
      $headers = "MIME-Version: 1.0\n"
                ."From: \"".$name."\" <".$email.">\n"
                ."Content-type: text/html; charset=iso-8859-1\n";
      $body = "Name: ".$name."<br>\n"
                ."Email: ".$email."<br>\n"
                ."Contact No: ".$contact_number."<br>\n"
                ."Address1: ".$address1."<br>\n"
                ."Address2: ".$address2."<br>\n"
                ."Town: ".$town."<br>\n"
                ."County: ".$county."<br>\n"
                ."Postcode: ".$postcode."<br>\n"
                ."Property Type: ".$propertyType."<br>\n"
                ."Property Area: ".$propertyArea."<br>\n"
                ."Rear ground extension: ".$rearExt."<br>\n"
                ."Side ground extension: ".$sideExt."<br>\n"
                ."Two-storey rear extension: ".$twoStoreyRear."<br>\n"
                ."Two-storey side extension: ".$twoStoreySide."<br>\n"
                ."Loft conversion: ".$loft."<br>\n"
                ."New build: ".$newBuild."<br>\n"
                ."Flat: ".$flat."<br>\n"
                ."Other: ".$other."<br>\n"
                ."Message:<br>\n"
                .$message;
      if (!ereg("^[a-zA-Z0-9_]+@[a-zA-Z0-9\-]+\.[a-zA-Z0-9\-\.]+$", $email))
        echo "That is not a valid email address.  Please return to the"
               ." previous page and try again.";
        exit;
        mail($toemail, $subject, $body, $msg, $headers);
        echo "Thanks for submitting your comments";
    ?>
    </body>
    </html>

    Dear David
    Thank you so much for the clear explanation. I have been using Lynda.com Dreamweaver CS5 tutorial. I found the coding for checkbox through search and added to the coding from Lynda.com tutorial.
    I made few changes to the coding by removing:
    $msg = "$rearExt<br>\r\n$sideExt<br>\r\n$twoStoreyRear<br>\r\n
              $twoStoreySide<br>\r\n$loft<br>\r\n$newBuild<br>\r\n$flat<br>\r\n$other\r\n";
    as the email message shows the results from the checkbox twice.
    I also removed the <br> from:
    $body = "Name: $name<br>\r\n
              Email: $email<br>\r\n
              Contact No: $contact_number<br>\r\n
             Other: $other\r\n
              Message:\r\n
                $message";
    I have add the result and the PHP coding you have helped to fixed for anyone needing a working PHP code containing Text Fields, Drop Down List, Checkbox and Text Area. Many thanks for all your help. If you have a coding to change the heading text colour I very much appericate it.
    Message sent to email:
              From: Name test <[email protected]>
                 Content-type: text/html; charset=iso-8859-1
    Name: Name test
              Email: [email protected]
                      Contact No: 0123456789
                      Address1: addy1
                      Address2: addy2
                      Town: T
                      County: C
                      Postcode: P/C
                      Property Type: End of Terrace
                      Property Area: Listed Building
                      Rear ground extension: Rear ground extension: No
                     Side ground extension: Side ground extension: No
                     Two-storey rear extension: Two-storey rear extension: Yes
                     Two-storey side extension: Two-storey side extension: No
                     Loft conversion: Loft conversion: No
                     New build: New Build: No
                     Flat: Flat: Yes
                     Other: Other: No
             Message:
               Test message
    PHP coding for customer contact page:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <META HTTP-EQUIV="refresh" content="0;URL=thankyou.html">
    <title>Email Form</title>
    </head>
    <body>
    <?php
      $name=$_POST['name'];
      $contact_number=$_POST['contact_number'];
      $email=$_POST['email'];
      $address1=$_POST['address1'];
      $address2=$_POST['address2'];
      $town=$_POST['town'];
      $county=$_POST['county'];
      $postcode=$_POST['postcode'];
      $propertyType=$_POST['propertyType'];
      $propertyArea=$_POST['propertyArea'];
      $rearExt= isset($_POST['rearExt'])?"Rear ground extension: Yes":"Rear ground extension: No";
      $sideExt= isset($_POST['sideExt'])?"Side ground extension: Yes":"Side ground extension: No";
      $twoStoreyRear= isset($_POST['twoStoreyRear'])?"Two-storey rear extension: Yes":"Two-storey rear extension: No";
      $twoStoreySide= isset($_POST['twoStoreySide'])?"Two-storey side extension: Yes":"Two-storey side extension: No";
      $loft= isset($_POST['loft'])?"Loft conversion: Yes":"Loft conversion: No";
      $newBuild= isset($_POST['newBuild'])?"New Build: Yes":"New Build: No";
      $flat= isset($_POST['flat'])?"Flat: Yes":"Flat: No";
      $other= isset($_POST['other'])?"Other: Yes":"Other: No";
      $message=$_POST['message'];
    // you can specify which email you want your contact form to be emailed to here
      $toemail = "[email protected]";
      $subject = "From Website Test";
      $headers = "MIME-Version: 1.0\r\n
                 From: $name <".$email.">\r\n
                 Content-type: text/html; charset=iso-8859-1";
      $body = "Name: $name\r\n
              Email: $email\r\n
              Contact No: $contact_number\r\n
              Address1: $address1\r\n
              Address2: $address2\r\n
              Town: $town\r\n
              County: $county\r\n
              Postcode: $postcode\r\n
              Property Type: $propertyType\r\n
              Property Area: $propertyArea\r\n
              Rear ground extension: $rearExt\r\n
              Side ground extension: $sideExt\r\n
              Two-storey rear extension: $twoStoreyRear\r\n
              Two-storey side extension: $twoStoreySide\r\n
              Loft conversion: $loft\r\n
              New build: $newBuild\r\n
              Flat: $flat\r\n
              Other: $other\r\n
              Message:\r\n
                $message";
      if (!ereg("^[a-zA-Z0-9_]+@[a-zA-Z0-9\-]+\.[a-zA-Z0-9\-\.]+$", $email))
        echo "That is not a valid email address.  Please return to the"
               ." previous page and try again.";
        exit;
        mail($toemail, $subject, $body, $headers);
        echo "Thanks for submitting your message";
    ?>
    </body>
    </html>

  • DW CS5, Sending contact form results to email with page redirection using php script

    I am currently building a site from scratch with Dreamweaver, with the intent of replacing my current website layout that was designed using Intuit's website builder. My dreamweaver site is not online, but i have setup a local test server on my computer, using XAMPP, and i have an apache server with a MySQL database and a mercury mailserver running. I mention that in case it makes a difference in your answers. If necessary, I can include those settings, but that may be asking too much.
    I have an html contact form for users to schedule service appointments. I need the resulting actioned php file to do the following after submit is clicked: verify certain fields have been entered; prevent spammers or verify human visitors; send the form results to a (hidden from public view of any kind) email address; redirect user to a confirmation page, or an error page.
    I found the following code but being less than a newbie im not sure what needs to be changed, or if its even the right script i should be using:
    5 <?php
    6 $email = $_POST['email'];
    7 $mailto = '[email protected]';
    8 $mailsubj = 'You Have a Service Request';
    9 $url = '/MyLandingPage.html';
    10 $req = '0';
    11 $mailbody = "Results from form:\r\n";
    12 $space = ' ';
    13 $line = '
    14 ';
    15 foreach ($_POST as $key => $value)
    16 {
    17 if ($req == '1')
    18 {
    19 if ($value == '')
    20 {echo "$key is empty";die;}
    21 }
    22 $j = strlen($key);
    23 if ($j >= 20)
    24 {echo "Name of form element $key cannot be longer than 20 characters";die;}
    25 $j = 20 - $j;
    26 for ($i = 1; $i <= $j; $i++)
    27 {$space .= ' ';}
    28 $value = str_replace('\r\n', "$line", $value);
    29 $conc = "{$key}:$space{$value}$line";
    30 $text .= $conc;
    31 $space = ' ';
    32 }
    33 mail($emailadd, $subject, $text, 'From: '.$emailadd.'');
    34 echo '<META HTTP-EQUIV=Refresh CONTENT="0; URL='.$url.'">';
    35 ?>
    Can anyone please illuminate me on what I need?
    Thank You in advance

    Take a read here, this might enlighten you a little.
    http://www.paulgdesigns.com/learncontactform.php
    You are doing this with your local testing server, is it set up to email?
    Gary

Maybe you are looking for