[Tableaux] Lien Dynamique ?
Bonjour
J'aimerais dans mon tableau géré dynamiquement que dans la partie "liens" que j'ai un texte "Telecharger" et derrière le lien. Comme un :
<a href="lien.fichier.pdf"> telechargez </a>
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
| <p align="center" ><u> Notes Internes </u> <br> <br>
<table border="2" bgcolor="#339933" align="center" cellspacing="2" cellpadding="3" height="1%" width="79%">
<tr bgcolor="white">
<th>Num </th>
<th>Description</th>
<th>Date</th>
<th>Lien</th>
</tr>
<?php
// on se connecte à MySQL
$db = mysql_connect('localhost', 'root', '-');
// on sélectionne la base
mysql_select_db('-',$db);
// on crée la requête SQL
$sql = 'SELECT * FROM note WHERE type_note="Interne"';
// on envoie la requête
$req = mysql_query($sql) or die('Erreur SQL <br>'.$sql.'<br>'.mysql_error());
$total = mysql_num_rows($req);
// on fait une boucle qui va faire un tour pour chaque enregistrement
while($data = mysql_fetch_array($req))
{
// on affiche les informations de l'enregistrement en cours
echo '<tr bgcolor="white">';
echo '<td>'.$data["num_note"].'</td>';
echo '<td>'.$data["description"].'</td>';
echo '<td>'.$data["date_note"].'</td>';
echo '<td>'.$data["lien"].'</td>'; // probleme ici !!
echo '</tr>';
}
// on ferme la connexion à mysql
mysql_close();
?>
</table>
</p> |
J'ai essayé ça sans réussite :
Code:
<a href='.$data["lien"]'> Téléchargez! </a>;
J'ai mis ça hors du tableau mais j'aimerais l'intégrer dans le tableau
Code:
echo <a href="Organisation.php"onMouseOver="window.status='';return true"> Organisation </a>
Après restes a voir si c'est possible mais je penses que oui.
Cordialement,