:
<tr>
<td><?= $client['name']; ?></td>
<td><?= $client['email']; ?></td>
<td><?= $client['tell']; ?></
<td class="text-center"><button id="delete" class="glyphicon glyphicon-remove"></button></td>
</tr>
and java script:
$("#delete").click(function(){
var id = $(this).attr("id");
var request = $.ajax({
type: "POST",
data: "id="+id,
url: "/removeClient",
dataType: "json"
});
return false;
});
The part of php I solve .. I just want to get a $ _POST ['id'] and go to the method that will delete the record. Thanks!