houssam_ballout Posted April 27, 2011 Share Posted April 27, 2011 Hello, I had a page that lists the tags in a php page, I had make a link looks like : tag.php?ID=2&action=delete I need to give an alert before the tag being deleted. how can I do this? Thanks Link to comment https://forums.phpfreaks.com/topic/234829-alert-on-delete/ Share on other sites More sharing options...
kney Posted April 27, 2011 Share Posted April 27, 2011 Can you post the code of ur delete statement? Link to comment https://forums.phpfreaks.com/topic/234829-alert-on-delete/#findComment-1206773 Share on other sites More sharing options...
saurabhx Posted April 27, 2011 Share Posted April 27, 2011 That should be easy. In the tag.php page, check if $_GET['action']==delete. If action is delete, then show a question Like 'Are you sure you want to delete?' or something and provide two buttons (or links) - Yes and No. If 'Yes' is clicked, submit again to the page tag.php?ID=2&action=delete-confirmed Then in the beginning of the page, check if $_GET['action']==delete-confirmed. If it is, then run the code to actually delete the record. Link to comment https://forums.phpfreaks.com/topic/234829-alert-on-delete/#findComment-1206776 Share on other sites More sharing options...
houssam_ballout Posted April 27, 2011 Author Share Posted April 27, 2011 I know the logic, but I need help in the coding Thanks Link to comment https://forums.phpfreaks.com/topic/234829-alert-on-delete/#findComment-1207211 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.