CAn any one show me code or explain how i can display data from mysql database in drop down menu.
I will appreciate your Help))))

hello check this code:

$strQuery = "select $intID, $strName from $tableName order by $strOrderField $strMethod";
  $rsrcResult = mysql_query($strQuery);

  while($arrayRow = mysql_fetch_assoc($rsrcResult)) {
   $intIdField = $arrayRow["$intID"];
   $strNameField = $arrayRow["$strName"];
   echo "<option value=\"$intIdField\">$strNameField</option>\n";
  }

  echo "</select>\n\n";

thank you))it works.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.