Thanks very much John -- now that works. I managed to do it in a slightly different way as follows:
$query="select * from merchandise_major_categories";
$result=mysql_query($query);
echo "<select name='category'>";
while($row = mysql_fetch_array($result)){
echo "<option value=\"".$row['merchandise_major_cat_id']."\">".$row['merchandise_major_cat_name']."</option>"."\n";
}
echo "</select>";
Now, I am grappling with a consequent problem viz, to do the same exercise with a minor category table that has a foreign key linked to the major categories.
For instance, if the end-user had selected the major category bearing id 3 -- then in my second pull down list I want to list all "minor_category_names from minor_categories where major_category_id = 3".
Is this possible?
Thanks in advance.