Bonjour,
j ai un fichier php qui m affiche sous forme de tableau les elements de deux tables, label, reference, artiste ...
j ai ajouter a coté de chaque ligne de résultat modifier et supprimer en lien je souhaite que la personne quand elle clique sur modifier cela lui ouvre une nouvelle page dans avec la ligne selectionné que je pourrias modifier.
Par contre je ne vois pas comment recuperer la ligne pour laquelle j ai cliquer sur modifier.
Jespere que vous voyez ce que je veux dire
voila mon fichier
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Catalogue</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body link="#000000" vlink="#FFFFFF" alink="#FFFFFF">
<div id="body">
<div id="menu-container"><b>
<a href="label.php?lettre=[0-9]" class="active"><span class="text">0-9</span></a> |
<a href="label.php?lettre=A" target="_self"><span class="text">A</span></a> |
<a href="label.php?lettre=B" target="_self"><span class="text">B</span></a> |
<a href="label.php?lettre=C" target="_self"><span class="text">C</span></a> |
<a href="label.php?lettre=D" target="_self"><span class="text">D</span></a> |
<a href="label.php?lettre=E" target="_self"><span class="text">E</span></a> |
<a href="label.php?lettre=F" target="_self"><span class="text">F</span></a> |
<a href="label.php?lettre=G" target="_self"><span class="text">G</span></a> |
<a href="label.php?lettre=H" target="_self"><span class="text">H</span></a> |
<a href="label.php?lettre=I" target="_self"><span class="text">I</span></a> |
<a href="label.php?lettre=J" target="_self"><span class="text">J</span></a> |
<a href="label.php?lettre=K" target="_self"><span class="text">K</span></a> |
<a href="label.php?lettre=L" target="_self"><span class="text">L</span></a> |
<a href="label.php?lettre=M" target="_self"><span class="text">M</span></a> |
<a href="label.php?lettre=N" target="_self"><span class="text">N</span></a> |
<a href="label.php?lettre=O" target="_self"><span class="text">O</span></a> |
<a href="label.php?lettre=P" target="_self"><span class="text">P</span></a> |
<a href="label.php?lettre=Q" target="_self"><span class="text">Q</span></a> |
<a href="label.php?lettre=R" target="_self"><span class="text">R</span></a> |
<a href="label.php?lettre=S" target="_self"><span class="text">S</span></a> |
<a href="label.php?lettre=T" target="_self"><span class="text">T</span></a> |
<a href="label.php?lettre=U" target="_self"><span class="text">U</span></a> |
<a href="label.php?lettre=V" target="_self"><span class="text">V</span></a> |
<a href="label.php?lettre=W" target="_self"><span class="text">W</span></a> |
<a href="label.php?lettre=X" target="_self"><span class="text">X</span></a> |
<a href="label.php?lettre=Y" target="_self"><span class="text">Y</span></a> |
<a href="label.php?lettre=Z" target="_self"><span class="text">Z</span></a></b>
</div>
<?php
include ('config.php');
include ('connexion.php');
echo '<table>
<tr>
<th>Label</th>
<th>Référence</th>
<th>Artiste</th>
<th>Album</th>
<th>Format</th>
<th>Modifier</th>
<th>Supprimer</th>
</tr>';
// paramètre reçu désignant le critère du nom du label recherché
$param1 = mysql_real_escape_string($_GET['lettre']);
//
$sql = "SELECT * FROM label
INNER JOIN contenu ON contenu.id_label = label.id_label
Where nom_label REGEXP '^$param1' order by nom_label, reference;
";
$req = mysql_query($sql);
while ($resultat = mysql_fetch_array($req))
{
echo '<tr>';
echo '<td>'.$resultat['nom_label'].'</td>';
echo '<td>'.$resultat['reference'].'</td>';
echo '<td>'.$resultat['artiste'].'</td>';
echo '<td>'.$resultat['album'].'</td>';
echo '<td>'.$resultat['format'].'</td>';
echo '<td><a href="formulaire_de_mise_a_jour.php?reference='.$resultat['reference'].'">Modifier</a></td>';
echo '<td><a href="script_de_suppression.php?reference='.$resultat['reference'].'">Supprimer</a></td>';
echo '</tr>';
}
echo '</table>';
$var = $resultat;
if($var == null){
echo '<div align='center'>' "Aucne référence trouvée"'</div>';
}
?>
</body></html>
<?php
mysql_close();
?>
Merci
Configuration: Windows Vista
Firefox 3.0.6