Hi Larry.
There is no any problem to get connection to database. I used mysqli_error($dbc) and print_r($dbc) to find out if there’s any error, but didn’t get any message. I expect that this function retrieve from database all items which parent value is $parent and show tehm all as a list. If I use a simple code to get connection to database for printing all these items of fields which has same parent value, it will succeed:
$sql = "SELECT 'suo_kat' FROM 'kategoria' WHERE 'parent' = '$parent' ORDER BY 'suo_kat' ASC";
$r = mysqli_query($dbc, $sql);
if (!$r) {
echo "Sorry. Try again later." . mysqli_error($dbc);
} else {
while($row = mysqli_fetch_assoc($r)){
echo '<a class="teksti" href="">' . $row['suo_kat'][$i] . '</a><br />';
}
but I’ve to repeat so many times same code in same page to get accomplished the aim.