j'arrive à récupérer des données de ma base avec SELECT mais je voudrais que les données de mes titres apparaissent en lien vers la fiche qui correspond à ce titre
comment puis je faire Merci d'avance.
voila le code de ma 1ère page
<html >
<head>
<title>Document sans titre</title>
<style type="text/css">
<!--
#Layer1 {
position:absolute;
left:62px;
top:130px;
width:627px;
height:266px;
z-index:1;
}
#Layer2 {
position:absolute;
left:70px;
top:100px;
width:647px;
height:226px;
z-index:1;
}
-->
</style>
</head>
<body>
<div id="Layer2">
<form id="form1" name="form1" method="post" action="recherche2.php">
<table width="527" height="160" border="0" cellpadding="0">
<tr>
<td width="144"> </td>
<td width="186"><div align="center">
<div align="right">
<select name="quoi" id="quoi">
<option value="avion">marre</option>
<option value="voiture">voiture</option>
</select>
</div>
</div></td>
<td width="189"><div align="center">
<select name="endroit" id="endroit">
<option>touslesdépartements</option>
<option value="13009">13009</option>
</select>
</div></td>
</tr>
<tr>
<td height="58" colspan="3"><div align="center">
<input type="submit" name="Submit" value="rechercher" />
</div></td>
</tr>
</table>
</form>
</div>
</body>
</html>
et le code de ma 2ème
<?php
$liendb = mysql_connect("nomduserveur","identifiant","pass");
mysql_select_db ("nomdelabase");
$sql= "SELECT texte,titre
FROM annonce
WHERE categorie= '" . mysql_real_escape_string($quoi) . "'
AND departement = '" . mysql_real_escape_string($endroit) . "'";
$resultat =mysql_query($sql) or die (mysql_error());
$nb_lignes = mysql_num_rows($resultat);
$nb_colonnes = mysql_num_fields($resultat);
echo "<table border=1 width=100% >";
for ($i=0; $i<$nb_lignes; $i++)
{
echo "<tr>";
for ($j=0; $j<$nb_colonnes; $j++)
echo "<td>".mysql_result($resultat,$i,$j)."</td>";
echo"</tr>";
}
echo"</table>";
echo "$texte";
mysql_close($liendb);
?>