<?php include('../config/config.php'); $q = $_POST['q']; $sql = "DELETE FROM contacts WHERE ct_id = ".$q." "; $res = $conn->query($sql); if($res === TRUE){ echo 1; }else{ echo 0; } ?>