Should be quick and easy. Hasn't been.
I have a form with checkboxes for selecting the states to include in a result set of addresses. The form and each state checkbox on the seach form is written similar to this:
<form method="GET" action="lookup_results.php">
<input type="checkbox" name="geo_select" value="ME" id="ME-Maine"> ME-Maine<br>
What I want to do is include a variable in my final query that adds a "geo" criteria. Here's what I'm using so far:
$fields = implode(',',$_GET[geo_select]) ;
$query_geo = " AND 'State' IN ($fields)" ;
Then I add $query_geo to the end of my query string. Currently, $query_geo is outputting the following from a sample query:
AND 'State' IN (ME,NH,VT,MA,RI,CT)
The search is producing no results...even though there are something like 500 addresses in the 6 states above.
All other parts of the query string work fine.
Arrrgh... (or, "your assistance would be greatly appreciated!")