passing ajax variable to php
<pre><code>        function viewDetail(pid)
        {
               $.post("product.php", { data: pid});

               &lt;?php
               $data = $_POST['data'];
               retrieve_product_detail($data);
            ?&gt;
        }
</code></pre>

<p>i tried this method too, but value of 'pid' is not going to the function <code>retrieve_product_detail($data)</code> please help me i am so stuck soooooooooooon</p>
