Page does update with details from the database after i hit a button
<p>I have a code and the way it should work is,when they click on NEW CUSTOMER,it takes them to test1.php where in they enter the details and they hit submit.it saves all the details in properly in the database and when i go back and hit REFRESH ,it should come up with the customer details which they had entered in previously.
But what happens is, when i click on the REFRESH,it refreshes the same old page which is empty.I wanted to find out where am i missing the logic.Thanks in advance.
The sample code would be</p>

<pre><code>&lt;tr&gt;
    &lt;td class="tdvisitbig" colspan="5"&gt;THIS IS A TEST&lt;/td&gt;
&lt;/tr&gt;



 &lt;tr&gt;
 &lt;td class='tdvisitbig' colspan="5"&gt;&lt;input type="button" onClick="openVisit('test1.php?id=&lt;?=$key?&gt;&amp;name=&lt;?=$name?&gt;');return false;" value="NEW CUSTOMER" class="submit"&gt;&amp;nbsp;&lt;input type="button" value="REFRESH" name="add_xyz" class="submit" onClick="document.add.target='_self';document.add.action='test3.php?redirect=visit&amp;section=test page';document.add.submit();"&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;?

$q = "SELECT address,customernum,status FROM customer WHERE name='$name' ORDER BY customernum";
$r = mysql_query( $q , $Link );
while( $rw = mysql_fetch_assoc( $r ) )
{
    extract( $rw );

    ?&gt;
 &lt;tr&gt;

 &lt;? } ?&gt;
</code></pre>
