Ok, so heres my question. I have a select dropdown that is populated from my table, category_names. I am getting the id and the name and using the id as the value. And the name as the select name.
<?php
include("./config.php");
$query="SELECT id,name FROM category_names";
$result = mysql_query ($query);
echo "<strong>Pick as many that fit your business</strong><br/><br/>";
echo"<div style='overflow:auto;height:300px;width:100%'><select>";
// while loop
while($nt=mysql_fetch_array($result)){//Array or records stored in $nt
echo "<option value=NAME=$nt[id]>$nt[name]</option><br/>
";
}?>
Ok so that populates my select. But now I want to hit a little “ADD” hyperlink at the bottom and another identical select dropdown to appear underneath that is also populated from my database. And each select needs to add to a different row in table. How do I achieve this?
Simple function for populating selects on abstract array of values
and you can call it like: