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