Urgent je doit trouver cette requete

Fermé
mimigno Messages postés 1 Date d'inscription lundi 22 juin 2015 Statut Membre Dernière intervention 27 juin 2015 - 27 juin 2015 à 21:34
NHenry Messages postés 15113 Date d'inscription vendredi 14 mars 2003 Statut Modérateur Dernière intervention 22 avril 2024 - 27 juin 2015 à 21:41
bonsoir j'ai ce code
<?php
$bd = new PDO('mysql:host=localhost;dbname=tutoo', 'root', '');
$result = $bd->query('SELECT * FROM eleve');

?>
<html>
<head>
<title>la liste des eleves</title>
</head>
<body>


<table>
<thead>
<th>NOM</th>
<th>PRENOM</th>
<th>ACTION </th>
</thead>
<TBODY>
<?php while ($affiche = $result->fetch()){?>
<tr>
<td><?php
if(isset($affiche['NOM']))
{
echo $affiche['NOM'];
}
?></td>
<td><?php
if(isset($affiche['PRENOM']))
{
echo $affiche['PRENOM'];
}
?></td>
<td><?php if(isset($affiche['ACTION']))
{
echo $affiche['ACTION'];
}
?></td>
</tr>
<?php } ?> <td>



</tr>
</TBODY>



</table>



<TBODY>
mon problème maintenant c'est de savoir comment faire pour avoir dans la colonne ACTION les option modifier et supprimer pour chaque élevé
svp aidez moi

1 réponse

NHenry Messages postés 15113 Date d'inscription vendredi 14 mars 2003 Statut Modérateur Dernière intervention 22 avril 2024 331
27 juin 2015 à 21:41
Il te suffit de mettre l'ID de l'enregistrement dans le lien à afficher.
0