code event snipt dropdown
//create dropdown
$str = "";
$str.= "<select id=\"dropdown1\";\"><option value=\"\">Select Option</option>";
//select values from database
global $conn;
$strSQL = "select contenturl from [dbo].[DIGITALSIGNAGE]";
$rs = db_query($strSQL,$conn);
while ($data = db_fetch_array($rs))
$str.="<option value =". $data["contenturl"].">".$data["contenturl"]."</option>";
$str.="</select>";
echo $str;
//create dropdown
$str = "";
$str.= "<select id=\"dropdown1\";\"><option value=\"\">Select Option</option>";
//select values from database
global $conn;
$strSQL = "select contenturl from [dbo].[DIGITALSIGNAGE]";
$rs = db_query($strSQL,$conn);
while ($data = db_fetch_array($rs))
$str.="<option value =". $data["contenturl"].">".$data["contenturl"]."</option>";
$str.="</select>";
echo $str;
0 comments:
Post a Comment