This topic is locked

as show in the selection box selected item

3/12/2011 6:40:25 AM
PHPRunner General questions
juca author

In this code to display the check box selected item (translated by google)
//create dropdown box

$str = "";

$str.= "<select onchange=\"window.location.href=this.options[this.selectedIndex].value;\"><option value=\"\">Outras Cidades</option>";
//select values from database

global $conn;

$strSQL = "select distinct cidade from site order by cidade";

$rs = db_query($strSQL,$conn);

while ($data = db_fetch_array($rs))

$str.="<option value=\"site2_list.php?ctlSearchFor=".$data["cidade"]."&srchOptShowStatus=1&ctrlTypeComboStatus=0&srchWinShowStatus=0&a=integrated&id=1&criteria=and&type1=&value11=".$data["cidade"]."&field1=cidade&option1=Contains&not1=a=search&value=1\">".$data["cidade"]."</option>";

$str.="</select>";

echo $str;
thanks