merci pour votre reponse mais jai fais une autre essai par se code la
************
<?php
$cnx = mysql_connect( "localhost", "root", "" );
$db= mysql_select_db( "immobilier" );
$sql = "SELECT * FROM annonce";
$requete = mysql_query( $sql, $cnx ) or die( "ERREUR MYSQL numéro: ".mysql_errno()."<br>Type de cette erreur: ".mysql_error()."<br>\n" );
echo( "<table width=\"650\" border=\"1\" align=\"center\" cellpadding=\"2\" cellspacing=\"0\" class=\"bordGris\>");
while( $result = mysql_fetch_object( $requete ) )
{
echo( "<tr class=\"txt10\" bgcolor=\"#669900\"><td><b>" .$result->ref. "|" .$result->offre. "|</b><b><font color=\"#CC0000\">" .$result->prix. "</font></b>|" .$result->ville."</td>");
echo("<td><a href=\"#\" onClick=\"confirme('".$result->ref."')\" >supprimer</a></td>");
echo( "</tr>");
echo ("<tr class=\"txt10\" bgcolor=\"#FFFFFF\"><td><table width=\"600\" cellpadding=\"0\" cellspacing=\"6\"><tr><td align=\"center\" width=\"120\"><a href=\"#\" onclick=\"ouvrir(600,600,detail.php?ref=".$result->ref."\)>");
echo ("<img src='images.jpg' border=\"0\"></a></td><td class=\"txt\"><b>".$result->ville."</b><br>".$result->commentaire."<br><br></td></tr></table>");
}
?>
<script language="javascript">
function confirme( ref )
{
var confirmation = confirm( "Voulez vous vraiment supprimer cet enregistrement ?" ) ;
if( confirmation )
{
document.location.href = "supprimer.php?ref="+ref ;
}
}
</script>
*********************
mais ca marche pas il me donne le lien supprimer dans la meme ligne a le nombre des l'enregistrement