teknojunkey Posted August 6, 2009 Share Posted August 6, 2009 Hi I want to delete a row from a database without redirecting to a delete page, can i call a function from a link? or idealy have a javascript confirmation. echo "<tr> <td>$id</td> <td>$name</td> <td><a href=delete.php?id=$id >Delete</a> </td> </tr>"; //repeat $i++; } thanks Link to comment https://forums.phpfreaks.com/topic/169086-delete-row-from-same-page/ Share on other sites More sharing options...
watsmyname Posted August 6, 2009 Share Posted August 6, 2009 Hi I want to delete a row from a database without redirecting to a delete page, can i call a function from a link? or idealy have a javascript confirmation. echo "<tr> <td>$id</td> <td>$name</td> <td><a href=delete.php?id=$id >Delete</a> </td> </tr>"; //repeat $i++; } thanks well you either have to redirect to the same page or the other page, if you dont want redirection use ajax. Link to comment https://forums.phpfreaks.com/topic/169086-delete-row-from-same-page/#findComment-892082 Share on other sites More sharing options...
Adam Posted August 6, 2009 Share Posted August 6, 2009 As mentioned, you want to use AJAX. Don't depend on it though other-wise the functionality becomes unusable to someone with JS disabled. Link to comment https://forums.phpfreaks.com/topic/169086-delete-row-from-same-page/#findComment-892083 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.