31-01-2011, 01:22 PM
J'ai oublier de vous dire que je passe d'une boucle for à une while :
<?php
include "config.php";
// ON PASSE A LA MAP !!
?>
<html>
<head>
<title>MAP</title>
<link rel="stylesheet" href="default/jeu.css" />
</head>
<body>
</br>
<div id="village">
<div id="text"></div>
<a href="profile.php?id=<?php echo $_SESSION['userid'];?>"><img src="default/images/Jeu/icon<?php echo $_SESSION['skin']; ?>.png" style="position:absolute;top:<?php echo $_SESSION['posY'];?>;left:<?php echo $_SESSION['posX'];?>"/></a>
<?php
// AUTRE VILLAGE
$requeteALL = mysql_query('SELECT id,village,posx,posy,skin FROM users WHERE id != '.$_SESSION['userid'].'');
$downALL = mysql_fetch_array($requeteALL)
while ($downALL = mysql_fetch_array($requeteALL))
{
$posXall = $downALL['posx'];
$posYall = $downALL['posy'];
echo '<a href="profile.php?id='.$downALL['id'].'"><img src="default/images/Jeu/icon'.$downALL['skin'].'.png" style="position:absolute;top:'.$downALL[$posYall].';left:'.$downALL[$posXall].'"/></a>';
$downALL++;
$downALL = mysql_fetch_array($requeteALL);
}
?>
</div>
</body>
</html>