$q = mysqli_query($connect, "SELECT * FROM `tabel` WHERE `served_id` = '{$served}' AND `receiver` = '{$receiver}'";
$query = mysqli_fetch_assoc($q);
$q = mysqli_query($connect, "SELECT * FROM tabel WHERE served_id='".mysqli_real_escape_string($connect, $served)."' AND receiver='".mysqli_real_escape_string($connect, $receiver)."'") or die(mysqli_error($connect));
$query = mysqli_fetch_assoc($q) or die(mysqli_error($connect));