Php Pass variables individually to another page to get specific database table

How do I check which hyperlink was slelected on buildHere.php to get that specific database table to display products on content.php? When I click <a>?table1 for example, I pass that variable through URL, and access it with $_GET on the next page content.php to load ALL of products from database table, table1.

buildHere.php

//each of these <a> has there own table in database 
//each with products specific to <a> category.

<a href="content.php?table1">ADD</a>
<a href="content.php?table2">ADD</a>
<a href="content.php?table3">ADD</a>
etc... 

content.php

<?php
  $object = new Contents();
  $row = $object->getBuilders();
  foreach ($row as $product) :
?>

//this <a> link goes to pageContent.php to specific product
<a href="pageContent.php?id=<?php echo $product['id'];?>">

  //this is thumbnail image for the product link
  <img src="<?php echo $product['Image_thumb'];?>"/>

</a>

<h6>MANUFACTURER</h6>
  <p>
    <?php
      echo $product["Manufacturer"];
    ?>
  </p>

<?php
  endforeach;
?>

So far I can click on <a>?table1 and it loads the right table, product and thumbnail image. But I'm unsure how to check if the user clicks <a>?table2 or <a>?table3 then call to query, and query that table. Is there a way I can code this with least amount of queries like somehow say if user clicked this, pass variable and $_GET, based on $_GET variable place that name into sql query call and return that table? I will have like 10 tables fyi.

controllers/Contents.php

class Contents {
  
private $contentModel;

public function __construct() {
    $this->contentModel = new Content;
}

public function getBuilders() {
    $test = $this->contentModel->getContent();

    if (isset($_GET['table1']) || isset($_GET['table2']) 
         || isset($_GET['table3'])) {
        return $test;
    }
  }
}

models/Content.php

class Content {
  
private $db;

public function __construct() {
    $this->db = new Database;
}

//gets query for content.php
public function getContent() {
    
    $this->db->query("SELECT
                        a.id,
                        a.Manufacturer,
                        a.Price,
                        a.Material,
                        a.Platform,
                        a.MadeInAmerica,
                        b.Image_thumb
                    FROM
                        table1 AS a
                    LEFT JOIN tableImages AS b
                    ON
                        a.id = b.id;");

    $row = $this->db->content();

    if ($this->db->content()) {
        return $row;
    }else{
        return false;
    }
  }
}
How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum