function get_cut_products($cut)
{
db_connect();
$query = ("SELECT * FROM materinskieplati WHERE cut='$cut'") or die(mysql_error());
$result = mysql_query($query);
$result = db_result_to_array($result);
return $result;
}
<?
$cut = $_GET['id'];
$productss = get_cut_products($cut);
foreach($productss as $itemm):?>
<html>
<table align="center" cellpadding = "0" class="tovari" border="0" id="main-table"></table>
<tr>
<td align="top">
<div> <a href="index.php?view=product_bp&id=<?echo $itemm['id']?>"><IMG src="images/<? echo $itemm['image']?> " width="100" height="111" alt="" /></a></div>
<div class="discription">
<div class="tovari-model"><a href="#"><? echo $itemm['Model']?></a></div>
<div class="tovari-price">Price: <? echo $itemm['price']?></div>
</div>
</td>
</tr>
</td>
</tr>
</table>
</html>
<?endforeach;?>
var_dump($productss);
$select_query = mysqli_prepare($db_link, "SELECT * FROM materinskieplati WHERE cut=?");
mysqli_stmt_bind_param($select_query, 'i', $cut);
$select_query->execute();