Skip to content

Commit

Permalink
Fixing category page
Browse files Browse the repository at this point in the history
  • Loading branch information
melhadou committed Aug 13, 2021
1 parent d8efc55 commit a89d163
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions categories.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,13 @@

<!-- Blog Entries Column -->
<div class="col-md-8">


<?php
if (isset($_GET['c_id'])) {
$c_id = $_GET['c_id'];
}

$query = "SELECT * FROM categories WHERE cat_id = {$c_id}";
$select_all_cat_querys = mysqli_query($connection, $query);

while ($row = mysqli_fetch_assoc($select_all_cat_querys)) {
$cat_title = $row['cat_title'];
$cat_id = $row['cat_id'];

}

?>

<?php

$query = "SELECT * FROM posts WHERE post_category_id = {$c_id}";
$select_all_posts_querys = mysqli_query($connection, $query);

Expand Down

0 comments on commit a89d163

Please sign in to comment.