Hello. I have a problem too, please help me.
Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, bool given in
<?php
require_once "conf.php";
?>
<?php
if (isset($_GET['id'])) {
$id = $_GET['id'];
$photogall = mysqli_query( "select * from `images` where id='$id'");
} else {
$photogall = mysqli_query($connect, "select * from images ORDER BY sort");
}
?>
<?php
if (!isset($_POST['id'])) {
?>
<?php
}
?>
<div align="center" class="codrops-demos">
<div>
<p align="center" class="title_cat"><b>Galeriaa</b></p>
<!--<div align="center"><img class="logoimg" src="images/hr1.png "></div>-->
<div align="center">
<?php
if (isset($_GET['id'])) {
$id = $_GET['id'];
$gall_row = mysqli_fetch_array($photogall);
$pho = mysqli_query("select * from photos where gal='$id'");
echo "<div align=\"center\" class=\"photogall\">" . $gall_row['name'] . "</div>";
?>
<div class="col">
<div class="card shadow-sm">
<div align="center" class="fotogallist rounded">
<?php
while ($phorow = mysqli_fetch_array($pho)) {
$photo = $phorow['photo'];
echo "<div class=\"col\">
<div class=\"card shadow-sm\"><img class=\"fotogallist\" src=\"" . $media_url . "user_data/photogall/" . $id . "/" . $photo . "\" alt=\"" . $gall_row['name'] . "\">
</div>
</div><br>";//BR ultimul
}
?>
</div>
</div>
</div>
<!--<div align="center"><img class="logoimg" src="images/hr1.png"></div>-->
<?php
} else {
?>
<div class="row row-cols-1 row-cols-sm-2 row-cols-md-4 g-3">
<?php
while ($gall_row = mysqli_fetch_array($photogall))
{
?>
<div class="col">
<div class="card shadow-sm">
<a
href="index.php?page=photogal2&id=<?php echo $gall_row['id']; ?>"><img
class="autofoto"
src="<?php echo $media_url; ?>user_data/photogall/<?php echo $gall_row['id'] . "/" . $gall_row['logo']; ?> "
alt="<?php echo $gall_row['name']; ?>"
title="<?php echo $gall_row['name']; ?>"></a>
<div class="card-body bg-dark">
<p class="card-text"><b><?php echo $gall_row['name']; ?></b></p>
<div class="d-flex justify-content-center align-items-center">
<small class="text-muted">
<script type="text/javascript" src="//yastatic.net/share/share.js"
charset="utf-8"></script>
<div class="yashare-auto-init" data-yashareL10n="ru"
data-yashareType="small"
data-yashareQuickServices="vkontakte,facebook,twitter,odnoklassniki,moimir,gplus"
data-yashareTheme="counter"></div>
</small>
</div>
</div>
</div>
</div>
<?php
}
?>
</div>
<?php
}
?>
</div>
</div>
</div>