Can't read POST values in PHP : <p>I have a problem and just can't figure out what's the issue:
In my php code I can't read any of the values included in the post request. </p>

<p>Even if I reduce the PHP-code to just reading the value, there comes a 500 error as response.</p>

<p>I inspected the POST-header: all the data is sent, so you should have access in php.</p>

<p>Here's the code:</p>

<pre><code>$('#contactForm').submit(function (e) {

e.preventDefault();
var $form = $(this);

// check if the input is valid
if (!$form.valid()) return false;



$.ajax({
    type: 'POST',
    url: 'contact.php',
    data: $('#contactForm').serialize(),

    success: function (response) {
        $(".formSuccess").show();
        $(".formError").hide();

    },
    error: function (response) {
        $(".formSuccess").hide();
        $(".formError").show();

    }
});
</code></pre>

<p>});</p>

<pre><code>contact.php

    &lt;?php
$empfaenger = "info@heitech.co.at";
$betreff = "Formularnachricht";
$text = "Formularnachricht: \n\n";
if(isset($_POST["name1"]))
{
  $text .= "Name: ".&amp;_POST["name1"];
}
if(isset($_POST["email1"]))
{
  $text .= "\n\nEmail: ".&amp;_POST["email1"];
}
if(isset($_POST["message1"]))
{
  $text .= "\n\nNachricht: ".&amp;_POST["message1"];
}

//$text = wordwrap($text, 70); 
mail($empfaenger, $betreff, $text);
?&gt;
</code></pre>

<p>Thanks for your help! :)</p>
