POST a javascript objet to a PHP file
<p>I try to post an JS object to PHP, but the PHP says nothing.. It looks like it don't recognize the POST...</p>

<p>Here is the JS :</p>

<pre><code>$('.send').click(function() {
    var Scommand = JSON.stringify(command);// Command is my JS obj

    if (commande.type) {
        $.ajax({
            url:'test.php',
            context:$(this),
            type:'POST',
            data:Scommande,
            success : function(data){
                commande = {};
                window.location='test.php';
            }
        });//End Ajax
    }
    else {'PLz specify a type');}
});
</code></pre>

<p>And my PHP  : </p>

<pre><code>&lt;?php
echo $_POST['type'];
?&gt;
</code></pre>

<p>It returns : Notice: Undefined index: type in /Applications/MAMP/htdocs/BackOfficeDavid/test.php on line 2</p>

<p>Like nothing go throw the POST ... Any clue ?</p>
