if ($_POST[city]) {
$where[] = "city ~* '$_POST[city]'";
}
- if ($_POST[class]) {
- if (($_POST[class] == "tag") || ($_POST[class] == "woche")) {
- $where[] = "(type = '$_POST[class]' OR type = 'u$_POST[class]')";
+ if ($_POST["class"]) {
+ if (($_POST["class"] == "tag") || ($_POST["class"] == "woche")) {
+ $where[] = sprintf("type = '%s' OR type = 'u%s'", $_POST["class"], $_POST["class"]);
} else {
- $where[] = "type = '$_POST[class]'";
+ $where[] = sprintf("type = '%s'", $_POST["class"]);
}
}