Add a dropdown list box with specific values.
For example, select a car make name from the dropdown list box, and make it so that only the data for the selected car make is displayed.
Insert PHP code snippet on the Page Designer screen to do so:
$str= "<select style='width: 150px; display: inline-block;' class='form-control' onchange=\"window.location.href=this.options[this.".
"selectedIndex].value;\"><option value=\"\">Please select</option>";
//select values from the database
$strSQL = "select Make from Cars";
$rs = db_query($strSQL);
while ($data = db_fetch_array($rs))
$str.="<option value='cars_list.php?q=(Make~equals~".
$data["Make"].")'>".$data["Make"]."</option>";
$str.="</select>";
echo $str;
See also: