I've spent a lot of time messing around with PHP and MYSQL and I've finally managed to create a "to do list" sort of thing that allows the user to submit a "to do" task and for it to add it to a database and then show it. I've followed many tutorials as I've tried to teach myself PHP blah blah. But for some reason i cannot get the delete script working.
echo "<td><a href='delete.php?=Delete" . $row['task_id']."'>Delete"."</a>"."</td></tr>" . "$record->ID";
Above is the code for the delete button
Here is the delete script apologies for the many commented out lines I've tried many 'solutions'.
    $ID = $_GET['task_id'];
    //$delete_query = "DELETE FROM Tasks WHERE ID =  $ID" ;
    $sql = "DELETE FROM Tasks WHERE task_id = $ID;";
    echo $row['task_id'];
    // $delete_query = "DELETE FROM Tasks WHERE task_id = ['task_id'] ";
    
    /* if(isset($GET['task_id'])){
       $delete = $_GET['task_id'];
        mysqli_query($connect, "DELETE FROM Tasks WHERE task_id = '$delete'");
    } */
    
    
    
    echo("Succesfully deleted");
    mysqli_close($link);
The script runs and it says "successfully deleted" but the entry still shows. In the F12 Menu/Network tab I get this error
And when I click "view source" it shows the ID of the row. I can't seem to figure out what is wrong.
 
     
     
     
    