note4

Sunday, September 9, 2018

4:44 AM
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; 

0 comments: