names; $catg = $data->cat; $getp = $DBcon->prepare("select * from items where (item_name ='$itemname' and item_category = '$catg')") ; $getp->execute() ; $row = $getp->fetch(pdo::FETCH_ASSOC) ; $price = $row['vlprice'] ; echo $price ; ?>