Show all rows in mysql table then give option to delete specific ones

前端 未结 3 1297
无人及你
无人及你 2021-02-03 14:56

I want to have the ability to show all the entries in a database table and by each one give the user the ability to delete specific ones.

I am currently using a for each

3条回答
  •  天命终不由人
    2021-02-03 15:38

    You can do it with forms:

    //main.php

    
    
    
    Recent Posts

    //delete.php:


    Or you can do it with jQuery and AJAX:

    //main.php

    
    
    
    Recent Posts

    //delete.php


    It's all untested and sure needs some adjustment for your specific project, but I think you get the idea and I hope it helps.

    Next time, please post your schema if you ask stuff about database.

提交回复
热议问题