I am trying to delete a row based on its ID
HTML:
<form action="" method="post">
<input type="submit" name="delete" value=" delete "/>
</form>
PHP:
$u = $_REQUEST['edit']; // contains the ID of row to be deleted
if(isset($_POST['delete'])){
$db->exec("DELETE FROM infos WHERE id = '$u'");
}
Nothing happens when the delete button is pressed. How can I fix this?