<?php
function pojava_reci_recenica($rec, $recenica, $dokument)
{
$con= mysqli_connect("localhost","tagstudi_aldina","aldina1234567","tagstudi_dokumenta");
$result = mysqli_query($con,"SELECT br_poj FROM recenica_reci
WHERE id_dokumenta=$dokument and id_recenice=$recenica and rec='$rec'");
$m=0;
while($row = mysqli_fetch_array($result))
  {
 $m = $row['br_poj'];
  }
return $m;
}
//$a=pojava_reci_dokument('razli',2,1001);
// echo $a;
?>