Php - Mysql requete

jesaye Messages postés 45 Date d'inscription   Statut Membre Dernière intervention   -  
jesaye Messages postés 45 Date d'inscription   Statut Membre Dernière intervention   -
Bonjour,

Voila j'ai une page list-match.php qui affiche les differents matchs de mes equipes du club.
Mes resultats s'affiche dans un tableau sous forme date / heure / domicile / score / Visiteur et je voudrais créer une page details quand je clique dessus cela m'affiche une autre page avec plus de details : Lieu / Stade / Buteurs / Forfaits .
Le probleme, je trouve pas le code à incorporer pour quand je clique sur details d'un match il affiche le details du match selectionné.
Voila mon code :
              <thead>
            <tr>
                <th class="t_edit">Modif</th>
                <th class="t_del">Suppr</th>
                <th class="numid sortable-num">Num</th>
                <th class="t_date">Date Match</th>
                <th class="date">Heure</th>
                <th class="domicile">Domicile</th>
                <th colspan="3" class="scores">Scores</th>
                <th class="visiteurs">Visiteurs</th>
                <th class="datereport">Détails</th>
            </tr>
        </thead>
        <tbody>
<?php
    if (isset($_POST['saison']) && ($_POST['compet_id']!='')) {
    	$result = get_list_matchs_saison_compet($_POST['saison'],$_POST['compet_id']);
    } else {
    }
    $num_ligne = 1;     // initialisation du numero de chaque champs
    while($match = mysql_fetch_assoc($result) ):
?> 
            <tr>
                <td class="c_mod"><a href="index.php?page=match&modif=<?php echo $match['cal_id']; ?>" title="Modifier"><img src="./images/editer.png" /></a></td>
                <td class="c_del"><a href="index.php?page=list-match&suppr=<?php echo $match['cal_id']; ?>" title="Supprimer" onclick="return(confirm('Etes-vous sûr de vouloir supprimer cette entrée?'));"><img src="./images/corbeille.gif" /></a></td>
                <td class="t_num"><?php echo $num_ligne++; ?></td>
              <td nowrap="nowrap"><?php echo $match['cal_date']; ?></td>
              <td nowrap="nowrap"><?php echo $match['cal_heure']; ?></td>
              <td nowrap="nowrap" ><?php echo $match['cal_locaux']; ?></td>
              <td class="scores" nowrap="nowrap" style="background-color:#00BB00"><?php echo $match['cal_score_locaux']; ?></td>
              <td class="scores" nowrap="nowrap" style="background-color:#00BB00">-</td>
              <td class="scores" nowrap="nowrap" style="background-color:#00BB00"><?php echo $match['cal_score_visiteurs']; ?></td>
              <td nowrap="nowrap" ><?php echo $match['cal_visiteurs']; ?></td>
              <td nowrap="nowrap"><a href="details.PHP?keepThis=true&amp;TB_iframe=true&amp;height=750&amp;width=550" class="thickbox"><img src="images/details.gif" width="50" height="16" /></a></td>
            </tr>
<?php endwhile; ?>
        </tbody>
        </table >

Merci d'avance.
A voir également:

2 réponses

oXyde68 Messages postés 747 Date d'inscription   Statut Membre Dernière intervention   350
 
Essaye de créer un ID différent pour chaque enregistrement.

Ensuite l'utilisateur clique sur le nom du match ( le script récupère son ID ) et affiche les résultat correspondant à son ID.
0
jesaye Messages postés 45 Date d'inscription   Statut Membre Dernière intervention  
 
j'ai un id auto-increment, qui s'appelle cal_id mais comment coder tous sa ? La je lutte un peu.

Merci
0