无法使用PHP将数据从数据库放入表中

时间:2015-06-12 07:01:00

标签: php

我的问题是我无法用我在数据库中获得的数据填充表格。我用PHP编写了一个代码,但它没有工作,我也不知道如何使它工作。任何的想法 ?这是我的代码: 查看gestJury:

<h3>Liste des jurys :</h3>
<div class="tablebox">
    <table>
            <thead>
                <tr>
                <th>N°</th>
                <th>Professeur1</th>
                <th>Professeur2</th>
                <th>Salle</th>
                <th>Heure</th>
                <?php if($rang == 0){ ?>
                <th class="action" >Supprimer</th>
                <?php } ?>
            </tr>
        </thead>

        <?php $i = 0; ?>
        <?php while($donnees = $listeJury->fetch(PDO::FETCH_ASSOC)){ 
            $i = $i + 1;
        ?>
        <tbody>
            <tr class="row0">
                <td><?php echo $donnees['idJury'] ?></td>
                <td><?php echo $donnees['idProf'] ?></td>
                <td><?php echo $donnees['idProf2'] ?></td>
                <td><?php echo $donnees['Salle'] ?></td>
                <td><?php echo $donnees['horaireJury'] ?></td>
            </tr>
        </tbody>
        <?php } ?>
    </table>
</div>                  

index.php:

function listJuryGlobal(){
    $jury = new Professeur();
    $listeJury = $jury->getJuryGlobal();
    require('view/gestJury.php');
}

0 个答案:

没有答案