how to work post method in jquery pop up button click
<p>In my php page there is a jquery pop up. Some php code is working on a button click but on the post method never works. Please help. Also i am checking for file upload using jquery.</p>

<p>the pop up contains</p>

<pre><code>&lt;div id="dialog" title="Dialog Title"&gt;&lt;div id="main"&gt;
      &lt;div id="caption"&gt;UPLOAD FILE&lt;/div&gt;
      &lt;div id="icon"&gt;&amp;nbsp;&lt;/div&gt;
        File to upload:&lt;center&gt;
        &lt;table&gt;
          &lt;tr&gt;&lt;td&gt;&lt;input name="upfile" type="file" size="36"&gt;&lt;/td&gt;&lt;/tr&gt;
          &lt;tr&gt;&lt;td align="center"&gt;&lt;br/&gt;&lt;input class="text" type="submit" name="submitBtn" value="Upload"&gt;&lt;/td&gt;&lt;/tr&gt;
        &lt;/table&gt;&lt;/center&gt;  
      &lt;/form&gt;
&lt;?php    
echo "jj";
    if (isset($_POST['submitBtn'])){
        echo "ff";

?&gt;
      &lt;div id="caption"&gt;RESULT&lt;/div&gt;
      &lt;div id="icon2"&gt;&amp;nbsp;&lt;/div&gt;
      &lt;div id="result"&gt;
        &lt;table width="100%"&gt;
&lt;?php

$currentdir = getcwd();
$target=$currentdir."\\images\\contentimages\\";
$target = $target . basename( $_FILES['upfile']['name']) ;
if(move_uploaded_file($_FILES['upfile']['tmp_name'],$target))
{
    header('location: /devtest/admin/images/browser.php');
} else{
    echo "There was an error uploading the file, please try again!";
}

?&gt;
        &lt;/table&gt;
     &lt;/div&gt;
&lt;?php            
    }
?&gt;
    &lt;div&gt;
    &lt;/div&gt;
        &lt;div class="ui-widget"&gt; &lt;/div&gt;
</code></pre>
