title: PHP Form Works Correctly in Firefox, but not in IE and Chrome
body: <p>I'm trying to create a form that will send to my email. The form works perfectly in Firefox, however, <em>it does not work in Chrome/Internet Explorer</em>. Hopefully someone can help!</p>
  
  <p><em>EDIT</em> What's happening is that my php is simply being displayed as text in the browser <em>EDIT</em></p>
  
  <p>HTML CODE:</p>
  
  <pre><code>   &lt;form action="contact.php" method="post" id="contactform"&gt;
         &lt;label for="myName"&gt;Name: &lt;/label&gt;
         &lt;input type="text" name="myName" id="myName" /&gt;
  
         &lt;label for="myEmail"&gt;E-mail: &lt;/label&gt;
         &lt;input type="email" name="myEmail" id="myEmail" /&gt;
  
         &lt;label for="myNumber"&gt;Phone Number: &lt;/label&gt;
         &lt;input type="tel" name="myNumber" id="myNumber" /&gt;
  
         &lt;label for="myComments"&gt;Comments: &lt;/label&gt;
         &lt;textarea name="myComments" id="myComments" rows="2" cols="20"&gt;&lt;/textarea&gt;
  
         &lt;input id="mySubmit" type="submit" value="Submit"&gt;
     &lt;/form&gt;
  </code></pre>
  
  <p>PHP: </p>
  
  <pre><code>&lt;?php
  $field_name = $_POST['myName'];
  $field_email = $_POST['myEmail'];
  $field_phone = $_POST['myNumber'];
  $field_message = $_POST['myComments'];
  
  $mail_to = 'alexandriadrugs@yahoo.com';
  $subject = 'Message from '.$field_name;
  
  $body_message = 'From: '.$field_name."\n";
  $body_message .= 'E-mail: '.$field_email."\n";
  $body_message .= 'Phone: '.$field_phone."\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 alexandriadrugs@yahoo.com');
          window.location = 'contact.html';
      &lt;/script&gt;
  &lt;?php
  }
  ?&gt;`
  </code></pre>