Jquery Ajax POST method is not working, return undefined value
<p>POST method return <strong>undefined value</strong>, but GET method working fine. I even tried <code>$.post(url, data, success);</code> &lt;&lt; <code>$.post</code> even worse GET and POST can't work.</p>

<pre><code>&lt;input type="submit" value="submit"  id="btnUpload"&gt;


$('#btnUpload').click(function(){       
$.ajax({  
    type: 'POST',  
    url: 'ajax.php',
    data: { 'action': 'scan_email' },
    success: function(response) {
        alert(response);
        }
    });
</code></pre>

<p>ajax.php</p>

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