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
<tr>
<td class="tdvisitbig" colspan="5">THIS IS A TEST</td>
</tr>
<tr>
<td class='tdvisitbig' colspan="5"><input type="button" onClick="openVisit('test1.php?id=<?=$key?>&name=<?=$name?>');return false;" value="NEW CUSTOMER" class="submit"> <input type="button" value="REFRESH" name="add_xyz" class="submit" onClick="document.add.target='_self';document.add.action='test3.php?redirect=visit§ion=test page';document.add.submit();"></td>
</tr>
<?
$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 );
?>
<tr>
<tr>
<td class="tdvisitbig"><a href="#" onClick="openVisit('test2.php?id=<?=$key?>&name=<?=$name?>&orderkey=<?=$orderid?>');return false;">view customer details</a></td>
<td class="tdvisitbig"><a href="#" onClick="openVisit('test1.php?id=<?=$key?>&name=<?=$name?>&key=<?=$id?>');return false;">change customer details</a></td>
</tr>
<? } ?>
<tr>
<td class="tdvisitbig" colspan="5">THIS IS A TEST</td>
</tr>
<tr>
<td class='tdvisitbig' colspan="5"><input type="button" onClick="openVisit('test1.php?id=<?=$key?>&name=<?=$name?>');return false;" value="NEW CUSTOMER" class="submit"> <input type="button" value="REFRESH" name="add_xyz" class="submit" onClick="document.add.target='_self';document.add.action='test3.php?redirect=visit§ion=test page';document.add.submit();"></td>
</tr>
<?
$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 );
?>
<tr>
<tr>
<td class="tdvisitbig"><a href="#" onClick="openVisit('test2.php?id=<?=$key?>&name=<?=$name?>&orderkey=<?=$orderid?>');return false;">view customer details</a></td>
<td class="tdvisitbig"><a href="#" onClick="openVisit('test1.php?id=<?=$key?>&name=<?=$name?>&key=<?=$id?>');return false;">change customer details</a></td>
</tr>
<? } ?>