I was working on a search form that stores people's names in an array, and then wanted to create a query on the results page in PHP that uses an IN clause (if that's the best way; feel free to point me in another direction). Basically the page has checkboxes for all the names, so they can check one, many or all names. I tried using the implode function, but have been unsuccessful so far.
$yourName = implode("', '", $_POST['Your_name']);
if($dutyReq=="All" && $yourName!="All" ) $query="SELECT * FROM talent_eas WHERE Your_name IN ('$yourName')";
Does that look at all right? Would that handle all scenarios? I'm just starting out with PHP so I have no idea what I'm doing. I tried searching for my specific question but just didn't seem to see much use of the IN clause.