Javascript PHP pop up an image when click on search, upon closing the image show results
<p>When I click on search the image pop up, But the values of the form did not get pass to the php script.</p>

<p><strong>Click on search run this code-></strong></p>

<pre><code>&lt;?php 
$loan_amt = $_POST['loan_amt']; 
if($_POST['search']){
if($_POST['loan_amt']=="" || $_POST['loan_tenure']==""){
$error = "Please fill up the mandatory fields"; 
}else{
session_start();
$_SESSION['property_type'] = $_POST['property_type'];
$_SESSION['property_status'] = $_POST['property_status'];
$_SESSION['loan_amt'] = $_POST['loan_amt'];
$_SESSION['loan_tenure'] = $_POST['loan_tenure'];

header("location:rates_results.php");
}
}
?&gt;
</code></pre>

<p><strong>Form (Loan Amount Field)</strong></p>

<pre><code>&lt;form action="&lt;?php echo $_SERVER['PHP_SELF']; ?&gt;" method="post" onsubmit="this.loan_amt.value=this.loan_amt.value.replace(/\,/g,'')"&gt;
&lt;table width="400px"&gt;
&lt;tr&gt;
&lt;td class="color1" width="130"&gt;Loan Amt (SGD)*:&lt;/td&gt;
&lt;td width="258" align="left"&gt;
&lt;input type="text" style="width:150px;font-size:16px" onkeyup="format(this)" onchange="format(this)"
onblur="if(this.value.indexOf('.')==-1)this.value=this.value" name="loan_amt"&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;/form&gt;
</code></pre>

<p><strong>Search/Submit Button</strong></p>

<pre><code>&lt;div id="examples"&gt;
&lt;span id="images"&gt;
&lt;a href="images/9features.png" toptions="effect = clip, layout = quicklook"&gt;
&lt;input type="submit" class="buttonStyle" name="search" value="search" /&gt;
&lt;/a&gt;
&lt;/span&gt;
&lt;/div&gt;
</code></pre>
