I'm working on a project to learn about PHP, and at the moment I've taken a link to access the bank and bring everything that has its same value or id ...
<?php
$generos = explode(',', $post['genero']);
foreach ($generos as $categ){
$dbCheck = DBRead('generos', "WHERE id ='". $categ . "'");
?>
<a href="index.php?catalogo=<?php @$categ['id']; ?>"><?php echo $dbCheck[0]['genero']; ?></a>
<?php
if (isset($_GET['catalogo'])) {
$catalogo = $_GET['catalogo'];
$dadoCat = DBRead('posts', "WHERE status = 1 AND genero = '".$categ."' ORDER BY data DESC");
}
}
?>
In this case, $dbCheck[0]['genero'];
is returning the Genre that has been added to this video.
Once the value is returned to the screen, a link is generated on it so that when clicking it brings all the videos of this same genre
I'm at the beginning of learning, so I was not able to do many tests.