potrebujem poradiť
chcem spraviť (kategorie)
potrebuujem aby sa menil select podľa linku = href=games.php?page1&category=active
games.php kod
<?php
include('system/conn.ini.php');
if (isset($_GET['page']) && $_GET['page']!="") {
$page = $_GET['page'];
} else {
$page = 1;
}
$total_records_per_page = 3;
$offset = ($page-1) * $total_records_per_page;
$previous_page = $page - 1;
$next_page = $page + 1;
$adjacents = "2";
$result_count = mysqli_query($db,"SELECT id FROM games");
//$total_records = mysqli_fetch_array($result_count);
$total_records = mysqli_num_rows($result_count);
//$total_records = $total_records['total_records'];
$total_no_of_pages = ceil($total_records / $total_records_per_page);
$second_last = $total_no_of_pages - 1; // total page minus 1
$result = mysqli_query($db,"SELECT * FROM `games` LIMIT $offset, $total_records_per_page");
while($row = mysqli_fetch_array($result,)){
echo "
<div class='card text-center' style='width: 15rem;margin: 5px;'>
<div class='card-body'>
<h5 class='card-title font-weight-bold'>".$row['title']."</h5>
<p class='card-text'>".$row['category']."</p>
<div class='dropdown-divider'></div>
<img src='components/img/".$row['img']."'>
<div class='dropdown-divider'></div>
<span class='badge badge-primary'>windows</span>
<span class='badge badge-primary'>64/32</span>
<span class='badge badge-primary'>linux</span>
<div class='dropdown-divider'></div>
<a href='#' class='btn btn-primary' style='padding-top: 5px;'>Download</a>
</div>
</div>";
}
mysqli_close($db);
?>
link:
<div class="btn-group">
<button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Kategorie
</button>
<div class="dropdown-menu">
<a class="dropdown-item" href="games.php?page1&category=active">category</a>
<a class="dropdown-item" href="games.php?page1&category=active">Action</a>
<a class="dropdown-item" href="games.php?page1&category=simulator">Adult</a>
<a class="dropdown-item" href="games/g_adventure.php">Adventure</a>
<a class="dropdown-item" href="games/g_anime.php">Anime</a>
<a class="dropdown-item" href="games/g_building.php">Building</a>
<a class="dropdown-item" href="games/g_casual.php">Casual</a>
<a class="dropdown-item" href="games/g_eroge.php">Eroge</a>
<a class="dropdown-item" href="games/g_hack_and_slash.php">Hack and Slash</a>
<a class="dropdown-item" href="games/g_hidden_object.php">Hidden Object</a>
<a class="dropdown-item" href="games/g_horror.php">Horror</a>
<a class="dropdown-item" href="games/g_management.php">Management</a>
<a class="dropdown-item" href="games/g_mature.php">Mature</a>
<a class="dropdown-item" href="games/g_nudity.php">Nudity</a>
<a class="dropdown-item" href="games/g_open_world_sandbox.php">Open World / Sandbox</a>
<a class="dropdown-item" href="games/g_point_click.php">Point & Click</a>
<a class="dropdown-item" href="games/g_puzzle.php">Puzzle</a>
<a class="dropdown-item" href="games/g_racing.php">Racing</a>
<a class="dropdown-item" href="games/g_rpg.php">RPG</a>
<a class="dropdown-item" href="games/g_rts.php">RTS</a>
<a class="dropdown-item" href="games/g_sci-fi.php">Sci-fi</a>
<a class="dropdown-item" href="games/g_shooter.php">Shooter</a>
<a class="dropdown-item" href="games/g_simulation.php">Simulation</a>
<a class="dropdown-item" href="games/g_sport.php">Sport</a>
<a class="dropdown-item" href="games/g_strategy.php">Strategy</a>
<a class="dropdown-item" href="games/g_survival.php">Survival</a>
<a class="dropdown-item" href="games/g_text-based.php">Text-Based</a>
<a class="dropdown-item" href="games/g_tower-defense.php">Tower Defense</a>
<a class="dropdown-item" href="games/g_turn_based.php">Turn-Based</a>
<a class="dropdown-item" href="games/g_visual_novel.php">Visual Novel</a>
<a class="dropdown-item" href="games/g_vr.php">VR</a>
</div>
</div>
poradte prosím :(