PHP/HTML Add A remove button

前端 未结 2 1021
一整个雨季
一整个雨季 2021-01-26 02:32

I have the code below to retrieve rows from a database where the username column matches the base directory name:

$username =  basename(dirname(__FILE__));
$user         


        
2条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-26 02:39

    echo "X";
    

    create a page that with _GET['id'] parameter;

    And on that page i.e. deletepage.php?id=15

    $sql = "DELETE table FROM table WHERE id = ".(int)$_GET['id']
    
    mysql_query($sql);
    
    header("location: previoudpage.php");
    

提交回复
热议问题