PHP: Echoing values of input fields
<p>I am grabbing the values of several input fields with the help of an Ajax/JS function. The issue is that the values of the textbox are not being echoed. I checked with the firebug tool and it shows that the post is performed but there is a blank value. Why is the PHP not echoing the value when the JS function submits it?</p>

<p><a href="http://webprolearner2346.zxq.net/TabsNextPrev/index.php" rel="nofollow">EXAMPLE</a></p>

<p><strong>JS</strong></p>

<pre><code>&lt;script&gt;
$(document).ready(function() { 
    var timer = null;  
    var dataString;    
    function submitForm(){ 
        $.ajax({ type: "POST", 
            url: "index.php", 
            dataType: 'json', 
            success: function(result){ 
            $('#special').html('&lt;p&gt;' +  $('#resultval', result).html() + '&lt;/p&gt;');} 
        }); 
        return false; 
    } 
    $('#contact_form').on('keyup', function() { 
        clearTimeout(timer); 
        timer = setTimeout(submitForm, 2000); 
    }); 
});  
&lt;/script&gt;
</code></pre>

<p><strong>HTML</strong></p>

<pre><code>&lt;form action="" method="post" enctype="multipart/form-data" id="contact_form" name="form4"&gt; 
 &lt;div class="row"&gt;  
  &lt;div class="label"&gt;Contact Name *&lt;/div&gt; &lt;!-- end .label --&gt; 
    &lt;div class="input"&gt; 
      &lt;input type="text" id="contact_name" class="detail" name="contact_name" value="&lt;?php echo isset($_POST['contact_name'])? $_POST['contact_name'] : ''; ?&gt;" /&gt;  
      &lt;div id="special"&gt;&lt;span id="resultval"&gt;&lt;? echo $_POST['contact_name'];  ?&gt;&lt;/span&gt;&lt;/div&gt; 
    &lt;/div&gt;&lt;!-- end .input--&gt; 
 &lt;/div&gt;&lt;!-- end .row --&gt; 
 &lt;div class="row"&gt;  
  &lt;div class="label"&gt;Email Address *&lt;/div&gt; &lt;!-- end .label --&gt; 
   &lt;div class="input"&gt; 
    &lt;input type="text" id="email" class="detail" name="email" value="&lt;?php echo isset($_POST['email'])? $_POST['email'] : ''; ?&gt;" /&gt;  
    &lt;div id="special"&gt;&lt;span id="resultval"&gt;&lt;? echo $_POST['email'];  ?&gt;&lt;/span&gt;&lt;/div&gt; 
   &lt;/div&gt;&lt;!-- end .input--&gt; 
 &lt;/div&gt;&lt;!-- end .row --&gt; 
&lt;/form&gt;
</code></pre>
