Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.