title: PHP post data isn't being sent through
body: <p>Err I'm at my wits end (i suppose) with this issue. I don't see what I'm doing wrong and everything that must be there is there but this is still not working.</p>
  
  <p>I've used different forms and PHP mail scripts but nothing seems to work. The email is being sent but the info is always blank. <strong>See screenshot for example</strong>.</p>
  
  <p><a href="https://i.stack.imgur.com/iAb6C.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/iAb6C.png" alt="This is the screenshot link"></a></p>
  
  <p>What am i doing wrong?</p>
  
  <p>PLease help.</p>
  
  <p>Here is the form code:</p>
  
  <pre><code>    &lt;form id="main-contact-form" class="contact-form" name="contact-form" method="post" action="sendemail.php"&gt;
                    &lt;div class="row-fluid"&gt;
                      &lt;div class="span5"&gt;
                          First Name: &lt;input type="text" name="first_name"&gt;&lt;br&gt;
  Last Name: &lt;input type="text" name="last_name"&gt;&lt;br&gt;
  Email: &lt;input type="text" name="email"&gt;&lt;br&gt;
  Message:&lt;br&gt;&lt;textarea rows="5" name="message" cols="30"&gt;&lt;/textarea&gt;&lt;br&gt;
                      &lt;/div&gt;
                      &lt;div class="span7"&gt;
                          &lt;button type="submit" class="btn btn-primary btn-large pull-right"&gt;Send Message&lt;/button&gt;
                      &lt;/div&gt;
  
                  &lt;/div&gt;
  
  
              &lt;/form&gt;
  </code></pre>
  
  <p>and here is the <strong>entire PHP file</strong> (sendemail.php):</p>
  
  <pre><code>&lt;?php
      header('Content-type: application/json');
      $status = array(
          'type'=&gt;'success',
          'message'=&gt;'Email sent!'
      );
  
  
      $name = @trim(stripslashes($_POST['first_name']));
      $lastname = @trim(stripslashes($_POST['last_name']));  
      $email = @trim(stripslashes($_POST['email'])); 
      $message = @trim(stripslashes($_POST['message'])); 
  
      $email_from = "Website Contact Form";
      $email_to = '//removed real email address';
  
  
  $Body .= "Name: ";
  $Body .= $name;
  $Body .= "\n";
  $Body .= "Email: ";
  $Body .= $Email;
  $Body .= "\n";
  $Body .= "Message: ";
  $Body .= $Message;
  
  
      $body = 'Name: ' . $name . "\n\n" . 'Email: ' . $email . "\n\n" . 'Subject: ' . $subject . "\n\n" . 'Message: ' . $message;
  
      $success = mail($EmailTo, $Subject, $Body, "From: &lt;$email_from&gt;");
  
      $success = @mail($email_to, $subject, $body, 'From: &lt;'.$email_from.'&gt;');
  
  
      echo json_encode($status);
      die;
  </code></pre>
  
  <p>The web page of the form with the current code you see here running is: <a href="http://minha-consulting.com/contactus.html" rel="nofollow noreferrer">http://minha-consulting.com/contactus.html</a></p>
  
  <p>Thanks in Advanced.</p>