path from model view controller

Viewed 16

I allow myself to ask you a question today, because I have a small problem in my code. my links are not yet dynamic and I would like to make them dynamic so that they can show me certain resources. My action is supposed to direct me to my episode page but it can't find it. I have an mvc model. my problem is: "href="./?action="episode?idE=" Thanks in advance for your help.

<?php
include 'modele/connexionBD.php';

$req = "SELECT nomA, imageA, episode.*  FROM episode, anime WHERE episode.idA = anime.idA AND idAcE";
$res = $conn->query($req);
$animes = $res->fetchAll();
?>

<section class="hero-section">
    <div class="container-fluid ctn-card">
        <?php
        foreach ($animes as $anime) {
        ?>
            <a class="card" href="./?action=episode?idE=<?php echo $anime['idE']; ?>">
                <div class="card__background" style="background-image: url(./image/<?php echo $anime['imageA'] ?>)"></div>
                <div class="container-fluid ctn-content">
                    <span class="card__category">Episode <?php echo $anime['numE'] ?></span>
                    <h3 class="card__heading"><?php echo $anime['nomA'] ?></h3>
                </div>
            </a>
        <?php
        }
        ?>
    </div>
</section>
0 Answers
Related