如何在php页面的选项列表中显示sql行

I have create 3 categories. in sql named as Buyer, Seller and Common. I want to display them in my page as select option with drop down.

basically i want if user post some thing. he should chose that category. and in future if any one click on these categories.

it should display all the content which linked to that category.

here is my php

include "connect.php"; 
$sql="SELECT Seller,Buyer, Common FROM category order by name"; 

echo "<select name= Buyer value='Buyer'>Buyer</option>";

foreach ($dbo->query($sql) as $row){

echo "<option value=$row[Buyer]>$row[Seller]</option>"; 

}

echo "</select>";

and my data base table

enter image description here

replace this line, also add quotes to your value and use {}

echo "<option value='{$row['Buyer']}'>{$row['Seller']}</option>"; 
                    ^               ^

Also when you are concatenating the arrays in echo, its good to use {}, else you will get syntax errors.

try this

foreach ($dbo->query($sql) as $row) { 
  echo $row['Seller'];
}