So, I want to create a filter to pick choices from. I have created 12 drop-down menu for users to select values from, and then click a button. Lets say these are the drop downs A,B,..L each with their own value.
Now using php i want to query a table in sql server where those 12 values apply.
$conn = new PDO('sqlsrv:Server=address,port;Database=dbname',$username, $password);
$sth = $conn->prepare("Select COL1 FROM myTable WHERE A LIKE ? AND B LIKE ? AND C LIKE ? ... L LIKE ?");
$sth->execute(array($valA,$valB,...$valL);
$data = $sth->fetchAll();
print_r($data);
Is this even the right way or the best way to do it?