Ligne d'un tableau en php

Résolu
elecktro-chok Messages postés 67 Date d'inscription   Statut Membre Dernière intervention   -  
elecktro-chok Messages postés 67 Date d'inscription   Statut Membre Dernière intervention   -
Bonjour,

je crée un site internet, et sur l'une de mes pages il y a un tableau, j'aimerais que quand l'utilisateur click sur une ligne de ce tableau qu'il accede a une page mais comment faire car mon tableau est stocké dans une variable.
je vous donne mon code

?><form action="delete.php" method="post"><?php
while($row_req_result = mysql_fetch_array($row_req))
{
$num = $row_req_result['norequete'];
$date = $row_req_result['datecreation'];
$freq = $row_req_result['frequenceutili'];
$def = $row_req_result['definition'];
$syn = $row_req_result['syntaxe'];
$prerequi = $row_req_result['prerequis'];
$loca = $row_req_result['localisation'];
$dom = $row_req_result['libelledomaine'];
$ins = $row_req_result['libelleinstance'];
$nomtable = $row_req_result['nomtable'];
$sup="<input type='checkbox' name='$num' value='$num'> ";
$result_tableau.="
< a href=\"index.php\"><tr>
<td>$date</td>
<td>$freq</td>
<td>$def</td>
<td>$syn</td>
<td>$prerequi</td>
<td>$loca</td>
<td>$dom</td>
<td>$ins</td>
<td>$nomtable</td>
<td>$sup</td>
</tr>";
}
if ($result_tableau!="")
{
echo "<table border='1'>
<tr>
<td>Date de création</td>
<td>Fréquence d'utilisation</td>
<td>Définition</td>
<td>Syntaxe</td>
<td>Pré-requis</td>
<td>Localisation</td>
<td>Domaine</td>
<td>Instance</td>
<td>Nom Table</td>
<td>Supprimer</td>
</tr>";
echo $result_tableau;
echo "</table>";

vous pouvez voir le a href="index.php" dans le while.

A voir également:

2 réponses

ScroudaF Messages postés 121 Date d'inscription   Statut Membre Dernière intervention   11
 
Il faut mettre les balises de lien dans chaque cellule :
$result_tableau.=" 
<tr> 
<td>< a href=\"index.php\">$date</a></td> 
<td>< a href=\"index.php\">$freq</a></td> 
<td>< a href=\"index.php\">$def</a></td> 
<td>< a href=\"index.php\">$syn</a></td> 
<td>< a href=\"index.php\">$prerequi</a></td> 
<td>< a href=\"index.php\">$loca</a></td> 
<td>< a href=\"index.php\">$dom</a></td> 
<td>< a href=\"index.php\">$ins</a></td> 
<td>< a href=\"index.php\">$nomtable</a></td> 
<td>< a href=\"index.php\">$sup</a></td> 
</tr>"; 
0
elecktro-chok Messages postés 67 Date d'inscription   Statut Membre Dernière intervention  
 
merci
0