Page does update with details from the database after i hit a button
Posted
by swathi
on Stack Overflow
See other posts from Stack Overflow
or by swathi
Published on 2010-06-10T16:50:56Z
Indexed on
2010/06/10
17:32 UTC
Read the original article
Hit count: 137
php
|JavaScript
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>
<? } ?>
© Stack Overflow or respective owner