Skip to main content
Participant
January 21, 2012
Question

Submit button in form will not send info to email

  • January 21, 2012
  • 1 reply
  • 2261 views

I had a friend build a website in Dreamweaver CS5.5. Now that it is live, I can't get the "send" button on the form to send the information to my email.There is a sendmail.php set up. Any help would be much appreciated...Thank you.

The page is http://www.shieldscontracting.com/contact.html

The html is

    <form id="ContactForm" action="sendmail.php" method="post" enctype="multipart/form-data" style="margin-left:350px; margin-top:-20px;">

      <div class="rowi">

                      <p>Name:<br />

                                <input type="text" name="name" class="input required" />

                      </p>

</div>

                            <div class="rowi">

                                E-mail:<br />

                                <input type="text" name="email" class="input required email" />

                            </div>

                            <div class="rowi">

                                Phone:<br />

                                <input type="text" name="phone" class="input required" />

                            </div>

                <div class="rowi">Project Details:<br />

                                <textarea cols="50" name="message" rows="10"></textarea><br />

                  <a href="thankyou.html" class="link" onclick="sendmail.php"><span>Send</span></a></div>

    </form>

The sendmail.php is

<?php

$name = $_REQUEST['name'];

$email = $_REQUEST['email'];

$phone = $_REQUEST['phone'];

$message = $_REQUEST['message'];

  mail( "info@shieldscontracting.com", "Website Contact",

  "Contact From Website

  Name: $name

  Email: $email

  Phone: $phone

  Message: $message", "From: $email" );

   header( "Location: thankyou.html" );

?>

This topic has been closed for replies.

1 reply

Community Expert
January 21, 2012

First, the page is down, I just get a generic page.  Second you may need to reach out to your web host.  I see that you are using hosting from Intuit.  Being that they have a proprietary setup, some custom scripts may not work.

Third, once that is confirmed, if you are making this script I would recommend changing the $_REQUEST text in the sendmail to $_POST.  $_REQUEST means that your form can get spammed because they can pass the data via GET or POST.  The $_POST is just the first step to ensure the data came from your form.