par
stefanelle » 20 févr. 2009, 16:34
alors pour l'echo ca marche nickel merci pour le get ca marche mais il m affiche tout a chaque fois il ne fait pas le tri par lettre je rmest mon ceode peut etre ai je fait une erreur .... je suis desole je debute
Code : Tout sélectionner
<!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/
xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">
<head>
<meta http-equiv="content-type"
content="text/html; charset=iso-8859-1" />
<title>Handsandarms</title>
<link rel="stylesheet" type="text/css" href="style.css" />
</head>
<body>
<br></br>
<br></br>
<br></br>
<br></br>
<br></br>
<?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>
</tr>';
// paramètre reçu désignant le critère du nom du label recherché
$param1 = ($_GET['label']);
//
$sql = "SELECT * FROM label
INNER JOIN contenu ON contenu.id_label = label.id_label
Where nom_label LIKE '$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 '</tr>';
}
echo '</table>';
?>
</body></html>
<?php
mysql_close();
?>
alors pour l'echo ca marche nickel merci pour le get ca marche mais il m affiche tout a chaque fois il ne fait pas le tri par lettre je rmest mon ceode peut etre ai je fait une erreur .... je suis desole je debute
[code]
<!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/
xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">
<head>
<meta http-equiv="content-type"
content="text/html; charset=iso-8859-1" />
<title>Handsandarms</title>
<link rel="stylesheet" type="text/css" href="style.css" />
</head>
<body>
<br></br>
<br></br>
<br></br>
<br></br>
<br></br>
<?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>
</tr>';
// paramètre reçu désignant le critère du nom du label recherché
$param1 = ($_GET['label']);
//
$sql = "SELECT * FROM label
INNER JOIN contenu ON contenu.id_label = label.id_label
Where nom_label LIKE '$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 '</tr>';
}
echo '</table>';
?>
</body></html>
<?php
mysql_close();
?>
[/code]