I have a search page where the user can select multiple checkboxes. I'm trying to format the response page properly using pdo. I got the query to work, but not using the question marks. Is there a way to write this query with the question marks, or is it safe as it is?
Response Page
$groupid = implode("," , $_POST['groupid']);
$query=$con->prepare("SELECT custid FROM cus_grps WHERE groupid in (".$groupid.") GROUP BY custid");
$query->execute([]);
while ($row=$query->fetch()){ echo $row['custid']; }