par
Cyrano » 06 mai 2005, 11:47
Normal, tu n'as pas /échappé" les apostrophes dans la chaine:
echo '<tr onmouseover="this.style.backgroundColor=\'yellow\'" onmouseout="this.style.backgroundColor=\'silver\'" style="background-color: yellow"><td>'.$list['id_perso'].'</td><td>'.$list['nom_perso'].'</td><td>'.$list['prenom_perso'].'</td><td>'.$list['ville'].'</td></tr>';
Ceci dit, tu aurais pu faire autrement :
while($list=pg_fetch_array($result))
{
?>
<tr onmouseover="this.style.backgroundColor='yellow'" onmouseout="this.style.backgroundColor='silver'" style="background-color: yellow">
<td><?echo($list['id_perso']); ?></td>
<td><?echo($list['nom_perso']); ?></td>
<td><?echo($list['prenom_perso']); ?></td>
<td><?echo($list['ville']); ?></td>
</tr>
<?php
}
C'est plus propre et plus lisible
