title: Email form problems
body: <p>I have three email forms, which is allowing the user to send a message to one of my three emails, without having to write their own email. The forms are working and is sending the email, the problem is that the information such as the email sender and the message for the email, only works on my "support" form but not for the two other forms ("business","other").
  I am not sure what exactly is wrong.</p>
  
  <p>Important note, the reason there is three forms like I have done it, is because I have made three buttons called "business" "support" "other" and then when you click one of the buttons, the specific form appears.</p>
  
  <h2>html script with forms inside.</h2>
  
  <pre><code>&lt;!-- SUPPORT CONTACT FORM START--&gt;
              &lt;div class="contactSupportButton"&gt;&lt;input type="image" src="supportContactButtonNew.png" id="contactSupportBut" alt="contact support button" style="height: 40px; width: 100px" onClick="showSupForm()"/&gt;
                      &lt;div id="contactSupportForm"&gt;
  
                          &lt;form action="supFormSend.php" method="post" id="contactForms"&gt;
  
                          &lt;div id="nameLabelForm"&gt;
                              &lt;label for="name"&gt;Name:&lt;/label&gt;&lt;br&gt;
                              &lt;input type="text" id="nameInput" name="nameInput"/&gt;
                          &lt;/div&gt;
  
                          &lt;div id="emailLabelForm"&gt;
                              &lt;label for="mail"&gt;E-mail:&lt;/label&gt;&lt;br&gt;
                              &lt;input type="email" id="mailInput" name="mailInput"/&gt;
                          &lt;/div&gt;
  
                          &lt;div id="messageLabelForm"&gt;
                              &lt;label for="msg"&gt;Support Message:&lt;/label&gt;&lt;br&gt;
                              &lt;textarea id="messageInput" name="messageInput"&gt;&lt;/textarea&gt;
                          &lt;/div&gt;
  
                          &lt;div class="submitEmailButton"&gt;
                              &lt;button type="submit" id="submitButton"&gt;Send message&lt;/button&gt;
                          &lt;/div&gt;
  
                          &lt;/form&gt;
  
                      &lt;/div&gt;
                  &lt;/div&gt;
  
              &lt;!-- SUPPORT CONTACT FORM ENDING--&gt;
  
              &lt;!-- BUSINESS CONTACT FORM START--&gt;
              &lt;div class="contactBusinessButton"&gt;&lt;input type="image" src="businessContactButtonNew.png" id="contactBusinessBut" alt="contact business button" style="height: 40px; width: 110px" onClick="showBusForm()"/&gt;
                      &lt;div id="contactBusinessForm"&gt; 
  
                          &lt;form action="busFormSend.php" method="post" id="contactForms"&gt;
  
                          &lt;div id="nameLabelForm"&gt;
                              &lt;label for="name"&gt;Name:&lt;/label&gt;&lt;br&gt;
                              &lt;input type="text" id="nameInput"/&gt;
                          &lt;/div&gt;
  
                          &lt;div id="emailLabelForm"&gt;
                              &lt;label for="mail"&gt;E-mail:&lt;/label&gt;&lt;br&gt;
                              &lt;input type="email" id="mailInput" /&gt;
                          &lt;/div&gt;
  
                          &lt;div id="messageLabelForm"&gt;
                              &lt;label for="msg"&gt;Business Message:&lt;/label&gt;&lt;br&gt;
                              &lt;textarea id="messageInput"&gt;&lt;/textarea&gt;
                          &lt;/div&gt;
  
                          &lt;div class="submitEmailButton"&gt;
                              &lt;button type="submit" id="submitButton"&gt;Send message&lt;/button&gt;
                          &lt;/div&gt;
  
                          &lt;/form&gt;
  
                      &lt;/div&gt;
                  &lt;/div&gt;
              &lt;!-- BUSINESS CONTACT FORM ENDING--&gt;
  
              &lt;!-- OTHER CONTACT FORM START--&gt;
              &lt;div class="contactOtherButton"&gt;&lt;input type="image" src="otherContactButtonNew.png" id="contactOtherBut" alt="contact other button" style="height: 40px; width: 110px" onClick="showOtherForm()"/&gt;
                      &lt;div id="contactOtherForm"&gt;
  
                          &lt;form action="otherFormSend.php" method="post" id="contactForms"&gt;
  
                          &lt;div id="nameLabelForm"&gt;
                              &lt;label for="name"&gt;Name:&lt;/label&gt;&lt;br&gt;
                              &lt;input type="text" id="nameInput"/&gt;
                          &lt;/div&gt;
  
                          &lt;div id="emailLabelForm"&gt;
                              &lt;label for="mail"&gt;E-mail:&lt;/label&gt;&lt;br&gt;
                              &lt;input type="email" id="mailInput" /&gt;
                          &lt;/div&gt;
  
                          &lt;div id="messageLabelForm"&gt;
                              &lt;label for="msg"&gt;Other Message:&lt;/label&gt;&lt;br&gt;
                              &lt;textarea id="messageInput"&gt;&lt;/textarea&gt;
                          &lt;/div&gt;
  
                          &lt;div class="submitEmailButton"&gt;
                              &lt;button type="submit" id="submitButton"&gt;Send message&lt;/button&gt;
                          &lt;/div&gt;
  
                          &lt;/form&gt;
  
                      &lt;/div&gt;
                  &lt;/div&gt;
              &lt;!-- OTHER CONTACT FORM ENDING--&gt;
  </code></pre>
  
  <h2>php script's which sends the message to my emails.</h2>
  
  <h2>Support form (supFormSend.php):</h2>
  
  <pre><code>&lt;?php
  $field_name = $_POST['nameInput'];
  $field_email = $_POST['mailInput'];
  $field_message = $_POST['messageInput'];
  
  $mail_to = 'support@myemail.com';
  $subject = 'Message regarding support from '.$field_name;
  
  $body_message = 'From: '.$field_name."\n";
  $body_message .= 'E-mail: '.$field_email."\n";
  $body_message .= 'Message: '.$field_message;
  
  $headers = 'From: '.$field_email."\r\n";
  $headers .= 'Reply-To: '.$field_email."\r\n";
  
  $mail_status = mail($mail_to, $subject, $body_message, $headers);
  
  if ($mail_status) { ?&gt;
      &lt;script language="javascript" type="text/javascript"&gt;
          alert('Thank you for the message. We will contact you shortly.');
          window.location = 'contact.html';
      &lt;/script&gt;
  &lt;?php
  }
  else { ?&gt;
      &lt;script language="javascript" type="text/javascript"&gt;
          alert('Message failed. Please, send an email to support@myemail.com');
          window.location = 'contact.html';
      &lt;/script&gt;
  &lt;?php
  }
  header('Location: index.html');
  exit;
  ?&gt;
  </code></pre>
  
  <h2>Business form (busFormSend.php):</h2>
  
  <pre><code>&lt;?php
  $field_name = $_POST['nameInput'];
  $field_email = $_POST['mailInput'];
  $field_message = $_POST['messageInput'];
  
  $mail_to = 'business@myemail.com';
  $subject = 'Message regarding business from '.$field_name;
  
  $body_message = 'From: '.$field_name."\n";
  $body_message .= 'E-mail: '.$field_email."\n";
  $body_message .= 'Message: '.$field_message;
  
  $headers = 'From: '.$field_email."\r\n";
  $headers .= 'Reply-To: '.$field_email."\r\n";
  
  $mail_status = mail($mail_to, $subject, $body_message, $headers);
  
  if ($mail_status) { ?&gt;
      &lt;script language="javascript" type="text/javascript"&gt;
          alert('Thank you for the message. We will contact you shortly.');
          window.location = 'contact.html';
      &lt;/script&gt;
  &lt;?php
  }
  else { ?&gt;
      &lt;script language="javascript" type="text/javascript"&gt;
          alert('Message failed. Please, send an email to business@myemail.com');
          window.location = 'contact.html';
      &lt;/script&gt;
  &lt;?php
  }
  header('Location: index.html');
  exit;
  ?&gt;
  </code></pre>
  
  <h2>Other form (otherFormSend.php):</h2>
  
  <pre><code>&lt;?php
  $field_name = $_POST['nameInput'];
  $field_email = $_POST['mailInput'];
  $field_message = $_POST['messageInput'];
  
  $mail_to = 'other@myemail.com';
  $subject = 'Message regarding other from '.$field_name;
  
  $body_message = 'From: '.$field_name."\n";
  $body_message .= 'E-mail: '.$field_email."\n";
  $body_message .= 'Message: '.$field_message;
  
  $headers = 'From: '.$field_email."\r\n";
  $headers .= 'Reply-To: '.$field_email."\r\n";
  
  $mail_status = mail($mail_to, $subject, $body_message, $headers);
  
  if ($mail_status) { ?&gt;
      &lt;script language="javascript" type="text/javascript"&gt;
          alert('Thank you for the message. We will contact you shortly.');
          window.location = 'contact.html';
      &lt;/script&gt;
  &lt;?php
  }
  else { ?&gt;
      &lt;script language="javascript" type="text/javascript"&gt;
          alert('Message failed. Please, send an email to other@myemail.com');
          window.location = 'contact.html';
      &lt;/script&gt;
  &lt;?php
  }
  header('Location: index.html');
  exit;
  ?&gt;
  </code></pre>