1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
$select = 'SELECT * FROM infos';
$result = mysql_query($select,$db) or die ('Erreur : '.mysql_error() );
$total = mysql_num_rows($result);
// si on a récupéré un résultat on l'affiche.
if($total)
{
while($row = mysql_fetch_array($result))
{
echo '<area shape="circle" coords="'.$row["x"].','.$row["y"].','.$row["r"].'" href="carte.html?op='.$row["id"].'" alt="'.$row["ville"].'">';
echo ''."\n";
}
}
else {
echo 'Pas d\'enregistrements dans cette table...';
}
// on libère le résultat
mysql_free_result($result);
mysql_close ();
echo "</map>"
."<img src=\"images/france.jpg\" usemap=\"#ma_map\" alt=\"image\" height=\"533\" width=\"596\"> </td>"
."</tr>"
."</table>"; |
Partager