title: Web form sending duplicate emails
body: <p>first of all, I know this topic has been discussed in the past but I didn't manage to come to a conclusion, so any help is VERY appreciated.
  I know a bit of html but I'm not a programmer, I had someone building a website for me but the web form is often sending duplicate (even 3 or 4 times) emails. I believe (assume) it has to do with people refreshing or hitting the submit button more than once. I tried to disable the 'submit' but I didn't manage to.
  At this stage any fix would help. As long as I stop receiving multiple emails from senders.
  I will try giving you as much information as possible.
  This is the html code for the form:</p>
  
  <pre><code>&lt;div class="form-input"&gt;
                          &lt;div class="form-title"&gt;NAME&lt;/div&gt;
                          &lt;input id="form-name" type="text"&gt;&lt;/input&gt;
                      &lt;/div&gt;
  
                      &lt;div class="form-input"&gt;
                          &lt;div class="form-title"&gt;EMAIL&lt;/div&gt;
                          &lt;input id="form-email" type="text"&gt;&lt;/input&gt;
                      &lt;/div&gt;
  
                      &lt;div class="form-input"&gt;
                          &lt;div class="form-title"&gt;MESSAGE&lt;/div&gt;
                          &lt;textarea id="form-msg" type="text"&gt;&lt;/textarea&gt;
                      &lt;/div&gt;
  
                      &lt;div class="form-input"&gt;
                          &lt;div class="form-title"&gt;&amp;nbsp;&lt;/div&gt;
                          &lt;input id="form-send" type="submit" value="SEND"&gt;&lt;/input&gt;
                      &lt;/div&gt;
  
                  &lt;/div&gt;&lt;!--end of form holder--&gt;
  
                  &lt;div id="details-error"&gt;Please comlete all fields and include a valid email&lt;/div&gt;
                  &lt;div id="form-sent"&gt;Thankyou for your enquiry - We will be in touch shortly!&lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  
  &lt;/div&gt;
  </code></pre>
  
  <p>the following is the script I have:</p>
  
  <pre><code>// Contact Form Code
  
      $('#form-send').click(function(){
  
          var name = $('#form-name').val();
          var email = $('#form-email').val();
          var message = $('#form-msg').val();
          var option = $('#form-select').val();
          var error = 0;
  
          if(name === '' || email === '' || message === ''){
              error = 1;
              $('#details-error').fadeIn(200);
          }else{
              $('#details-error').fadeOut(200);
          }
  
          if (!(/(.+)@(.+){2,}\.(.+){2,}/.test(email))) {
              $('#details-error').fadeIn(200);
              error = 1;
          }
  
           var dataString = '&amp;option=' + option +'&amp;name=' + name + '&amp;email=' + email + '&amp;text=' + message;
  
              if (error === 0) {
                  $.ajax({
                      type: "POST",
                      url: "mail.php",
                      data: dataString,
                      success: function () {
                          $('#details-error').fadeOut(1000);
                          $('#form-sent').fadeIn(1000);
                      }
                  });
                  return false;
              }
  
      });
  
  });
  </code></pre>
  
  <p>And lastly, the mail.php:</p>
  
  <pre><code>    &lt;?php
  if ($_POST) {
      $name  = $_POST['name'];
      $email = $_POST['email'];
      $text  = $_POST['text'];
      $option = $_POST['option'];
      $headers = $option . "\r\n" . $name . "\r\n" . $email;
  
  
      //send email   
      mail("xxx@email.net", "Mail Enquiry", $text, $headers);
  }
  
  ?&gt;
  </code></pre>