$Brand=$_POST['Brand'];
if(isset($_POST['Brand']))
{
$Brand = implode(",", $_POST['Brand']);
} else {
$Brand = "";
}
echo "brands are :" .$Brand;
echo "<br>";
$sql2= "SELECT * FROM brand_master1 WHERE brand_name in ('$Brand')";
$result2 = mysql_query($sql2);
$row = mysql_fetch_array($result2,MYSQL_BOTH);
$bid=$row['id'];
echo "brand id is:";
print_r($bid);
in the below code am trying to get ids of brands by giving brand values to the query.... but it is giving only single id.... please anyone help me... my tables are... brand_master1(id,brand_name)