title: php form works on one site but not another
body: <p>I've been using the same contact form for quite a while:</p>
  
  <pre><code>&lt;?php
  if (isset($_POST['submit']) ) {
      $name = $_POST['names'];
      $email = $_POST['email'];
      $message = $_POST['message'];
      $robot = $_POST['robot'];
      $from = 'online@domain.co.uk'; 
      $to = 'info@domain.co.uk'; 
      $subject = 'Online Enquiry';
      $headers = "From: DOMAIN &lt;no-reply@domain.co.uk&gt; \r\n";
      $headers .= 'Reply-To:'. $email . "\r\n";
      $headers .= "X-Mailer: PHP/" . phpversion(); // Sender's Email
  
      $body = "From: $name\n E-Mail: $email\n Message:\n $message";
  } ?&gt;
  &lt;?php if (isset($_POST['submit'])) {
  if ($name != '' &amp;&amp; $email != '' &amp;&amp; $message !='') {
      if ($robot != 'yes') {               
          if (mail ($to, $subject, $body, $headers)) { 
              echo '&lt;p class="approved"&gt;&lt;strong&gt;Your message has been submitted&lt;/strong&gt;&lt;/p&gt;';
          } else { 
              echo '&lt;p class="warning"&gt;&lt;strong&gt;Something went wrong!&lt;/strong&gt;&lt;/p&gt;'; 
          } 
      } else if ($_POST['submit'] &amp;&amp; $robot == 'yes') {
          echo '&lt;p class="warning"&gt;&lt;strong&gt;Looks like you are spam!&lt;/strong&gt;&lt;/p&gt;';
      }
  } else {
      echo '&lt;p class="warning"&gt;&lt;strong&gt;Please complete all fields.&lt;/strong&gt;&lt;/p&gt;';
      }
  } 
  ?&gt;
      &lt;form id="contact" method="post" action="#contact"&gt;
  
      &lt;label&gt;Name&lt;/label&gt;
      &lt;input name="names" type="text" placeholder="NAME"&gt;
  
      &lt;label&gt;Email&lt;/label&gt;
      &lt;input name="email" type="email" placeholder="EMAIL"&gt;
  
      &lt;label&gt;Message&lt;/label&gt;
      &lt;textarea rows="10" name="message" placeholder="MESSAGE"&gt;&lt;/textarea&gt;
      &lt;input id="capture" name="robot" type="checkbox" value="yes"&gt;        
      &lt;input id="submit" name="submit" type="submit" value="Submit"&gt;
  
  &lt;/form&gt;
  </code></pre>
  
  <p>It works absolutely fine on other sites but doesn't work on one domain? submit simply returns the error  "Something went wrong!". the site is on the same cloud server as many of the other sites that work fine. It's driving me mad because I cant see an error. </p>
  
  <p>Turning debugging on I get the error:
  Notice: Undefined index: robot in /form-contact.php on line 6</p>
  
  <p>Ive tried removing the robot check all together and it still doesn't work, but generates no error when debugging?</p>
  
  <p>Can anyone offer any advice?</p>