Jump to content

Delete and Refresh


maliary

Recommended Posts

Hi,

 

I have this code that I am using to delete records from the database. It is deleting the records alright but the display out put is not reflected immediately after clicking to the delete button. I have to refresh the page or click on the button again for the record to disappear.

 

The form is getting called on the same page.

echo "<td><nobr> ".$tp['lo_toxic']." </nobr></td>";
echo "<td><nobr> ".$tp['hi_toxic']." </nobr></td>";
echo '<td> <a  href="labor_delete_param_admin.php?nr='.$tp['nr'].'"><img '.createLDImgSrc($root_path,'delete_sm.gif','0').'></a>
		</td>';

 

 

labor_delete_param_admin.php this page has both the delete and display code.

 

The delete code

 

$results = $db->Execute("DELETE FROM $dbtable WHERE nr= $nr");

 

I know for sure having the delete on a separete page would do the trick but isn't it possible on the same page?

Link to comment
https://forums.phpfreaks.com/topic/51161-delete-and-refresh/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.