I’m stuck on this - hopefully someone can help me. Thanks!
When a checkbox is selected a string (value) is added to the cityarray which is then used in a query. The problem appears to be the space between “new” and “york”. Used this way, the query no longer works. Single words work fine but not multiple words with spaces between them.
if (isset($_POST['city'])) {
// sanitize/validate before using it!
$selectedCity = $_POST['city']; // if this is used in a query use mysql_real_escape_string or the correct variant for whatever you are using
$cityarray[] = "type = '{$selectedCity}'";
}