Ich weiß jetzt nicht genau was Du willst, aber Du kannst das WHERE - Attribut einer SQL Abfrage mit AND erweitern.
SELECT * FROM irgendwas WHERE x = '1' AND y = 'test' AND z = '23432' ....
Mit Hilfe von PHP kannst Du die AND Werte dynamsich anhand des Formulars schreiben.
if($_POST["select1"] != "Bitte wählen") {
if($where != "") {
$where = $where . " AND x = '" . $_POST["select1"] . "'";
}
else {
$where = "WHERE bla = '" . $_POST["select1"] . "'";
}
}
$abfrage = @mysql_query("SELECT ... $where");
Hoffe mal das es so klappt.
|