Fetch Data from page and display on same page without refreshes
<p>I have a condition that i have to post the different values of checkbox to <em>page2.php</em> as well as display the value on same page. How do i do?</p>

<p><strong>Page1:</strong></p>

<pre><code>&lt;form method="post" action=""&gt;
&lt;input name="date1" type="checkbox" value="" id="1" /&gt;
&lt;input name="date2" type="checkbox" value=""  id="2"/&gt;
&lt;/form&gt;

$.ajax({
        type: 'POST',
        url: 'page2.php',
        data: data,   
        success:function(html){

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

<p><strong>Page2:</strong></p>

<pre><code>&lt;?php
    $date1 = POST_['date1'];
    $date2 = POST_['date2'];

    echo  $date1;
    echo  $date2;
?&gt;
</code></pre>
