![]() |
|
[PHP] [php] delete row with a <button> - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Web Development (https://hackforums.net/forumdisplay.php?fid=183) +---- Thread: [PHP] [php] delete row with a <button> (/showthread.php?tid=6085823) |
[php] delete row with a <button> - blackcoder00 - Jun 8, 2020 guys im wonder how can i create some button that delete data from a table i didn't find how could i do it so i have replaced the button with <a> tag ==><a href="edit.php?id= . $$row["name"] for the where condition delete from list where id = '$_GET['name']' ![]() index.php file PHP Code updatetable.php file PHP Code RE: [php] delete row with a <button> - HFDone - Jun 8, 2020 delete the row in the db and load the table again RE: [php] delete row with a <button> - blackcoder00 - Jun 8, 2020 i want to create a buttuon to select a specific item to delete it in the table RE: [php] delete row with a <button> - HFDone - Jun 8, 2020 so add button and onclick put the code to delete it and load the table again RE: [php] delete row with a <button> - blackcoder00 - Jun 8, 2020 (Jun 8, 2020 01:20 PM)HFDone Wrote: so add button and onclick put the code to delete it and load the table again can you show me some example please RE: [php] delete row with a <button> - HFDone - Jun 9, 2020 search for html table delete row by id RE: [php] delete row with a <button> - Squito - Jun 9, 2020 https://stackoverflow.com/questions/2906582/how-to-create-an-html-button-that-acts-like-a-link RE: [php] delete row with a <button> - blackcoder00 - Jun 9, 2020 (Jun 9, 2020 04:46 AM)Squito Wrote: https://stackoverflow.com/questions/2906582/how-to-create-an-html-button-that-acts-like-a-link dude i want to create a button that delete a specific row from database like the example in the picture RE: [php] delete row with a <button> - Squito - Jun 9, 2020 And I provided a solution, that you have to change slightly to work the way you want it. If I do it all for you, you are going to miss the 'figuring out' part of the process, which is eventually a bad thing. RE: [php] delete row with a <button> - HFDone - Jun 9, 2020 https://stackoverflow.com/a/46325093 RE: [php] delete row with a <button> - blackcoder00 - Jun 9, 2020 (Jun 9, 2020 08:16 AM)Squito Wrote: And I provided a solution, that you have to change slightly to work the way you want it. If I do it all for you, you are going to miss the 'figuring out' part of the process, which is eventually a bad thing. thank you alot dude i will try it <3 RE: [php] delete row with a <button> - Backbone - Jun 9, 2020 I do it like this. On table: Code - loop on resultOn back-end code: Code - Check for the action and id query paramRE: [php] delete row with a <button> - blackcoder00 - Jun 10, 2020 (Jun 9, 2020 07:39 PM)Backbone Wrote: I do it like this. your idea is pretty good thank you aloot RE: [php] delete row with a <button> - DyMa - Jun 12, 2020 (Jun 10, 2020 10:26 AM)blackcoder00 Wrote: your idea is pretty good thank you aloot friendly reminder to use prepared statement for this |