Click here to Skip to main content
15,867,141 members

Response to: PHP from mySQL into a drop down list dependant on group in table

Revision 2
You have your DB iterator

PHP
<?
while($objResult = mysql_fetch_array($objQuery))
{
?>


and inside this iterator you generate select box markup

PHP
<select name="<?=$objResult[" pidx="];?>"></select>


According to if criteria, you will create one select per each row.

Consider refactoring the code, by moving select tag generation outside of the items loop.
Posted 28-Jan-13 5:26am by Vyacheslav Voronenko.
Tags: , ,