Changement de page automatique

Fermé
madesigner Messages postés 4 Date d'inscription dimanche 22 février 2009 Statut Membre Dernière intervention 23 février 2009 - 22 févr. 2009 à 19:27
Bonjour, je voudrais que ma page change automatiquement quand mon tableau atteins 10 ligne je ne suis pas très doué je vous donne mon code merci .


<php>

<head>
<link rel="shortcut icon" href="favicon.ico" >
<link rel="icon" href="animated_favicon1.gif" type="image/gif" >
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Live</title>
<link href="style1.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
div.content_bottom {
padding: 4px;
padding-top: 0px;
line-height: 10pt;
}
font.bold {font-weight: bold; font-size: 8pt; "Trebuchet MS", verdana, sans-serif; }
input.sbutton {background-color: #DDDDDD; font-size: 8pt; font-weight: bold; font-family: verdana, arial, tahoma; }
input.text {
font-family: arial, verdana, tahoma, sans-serif;
padding-left: 0px;
}
input.text1 {font-family: arial, verdana, tahoma, sans-serif; padding-left: 2px; }
.Style16 {font-size: x-small}
-->
</style>
</head>


<body>

<div id="conteneur">

<div id="header">
<table width="800" height="101" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="336" height="60"> </td>
<td width="464" align="right" valign="top"> </td>
</tr>
</table>
<table width="800" height="24" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="24"><a href="INDEX1.php"
onMouseOver="document.img_1.src='images/acceuil1.jpg';"
onMouseOut="document.img_1.src='images/acceuil.jpg';"><img src="images/acceuil.jpg" alt="S" name="img_1" width="80" height="24" border="0" class="img"></a></td>
<td><a href="manager/index.php"
onMouseOver="document.img_2.src='images/MONBLOG1.jpg';"
onMouseOut="document.img_2.src='images/MONBLOG.jpg';"> <img src="images/MONBLOG.jpg" alt="S" name="img_2" width="80" height="24" border="0" class="img"></a></td>
<td><a href="menbre.php"
onMouseOver="document.img_3.src='images/menbre1.jpg';"
onMouseOut="document.img_3.src='images/menbre.jpg';"> <img src="images/menbre.jpg" alt="S" name="img_3" width="80" height="24" border="0" class="img"></a></td>
<td><a href="LOGIN.php"
onMouseOver="document.img_4.src='images/CONNECTION1.jpg';"
onMouseOut="document.img_4.src='images/CONNECTION.jpg';"><img src="images/CONNECTION.jpg" alt="S" name="img_4" width="80" height="24" border="0" class="img"></a></td>
<td><a href="signup.php"
onMouseOver="document.img_5.src='images/INSCRIPTION1.jpg';"
onMouseOut="document.img_5.src='images/INSCRIPTION.jpg';"> <img src="images/INSCRIPTION.jpg" alt="S" name="img_5" width="80" height="24" border="0" class="img"></a></td>
<td><a href="animaux.php"
onMouseOver="document.img_6.src='images/6.JPG';"
onMouseOut="document.img_6.src='images/1.JPG';"> <img src="images/1.jpg" alt="S" name="img_6" width="80" height="24" border="0" class="img"></a></td>
<td><a href="animaux.php"
onMouseOver="document.img_7.src='images/7.JPG';"
onMouseOut="document.img_7.src='images/1.JPG';"> <img src="images/1.jpg" alt="S" name="img_7" width="80" height="24" border="0" class="img"></a></td>
<td><a href="animaux.php"
onMouseOver="document.img_8.src='images/8.JPG';"
onMouseOut="document.img_8.src='images/1.JPG';"> <img src="images/1.jpg" alt="S" name="img_8" width="80" height="24" border="0" class="img"></a></td>
<td><a href="animaux.php"
onMouseOver="document.img_9.src='images/1B.JPG';"
onMouseOut="document.img_9.src='images/1.JPG';"> <img src="images/1.jpg" alt="S" name="img_9" width="80" height="24" border="0" class="img"></a></td>
<td><a href="animaux.php"
onMouseOver="document.img_10.src='images/2.JPG';"
onMouseOut="document.img_10.src='images/1.JPG';"> <img src="images/1.jpg" alt="S" name="img_10" width="80" height="24" border="0" class="img"></a></td>
</tr>
</table>
</div>

<div id="contenu">
<p class="cont"><br />
</p>
<br><table width="800" height="665" border="1" cellpadding="0" cellspacing="0">

</table>

<table width="800" height="650" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center" valign="top"><?
// information pour la connection à le DB
$host = '';
$user = '';
$pass = '';
$db = '';

// connection à la DB
$link = mysql_connect ($host,$user,$pass) or die ('Erreur : '.mysql_error() );
mysql_select_db($db) or die ('Erreur :'.mysql_error());


// requête SQL qui compte le nombre total d'enregistrement dans la table et qui
//récupère tous les enregistrements
$select ="SELECT BU.username,BU.signup_date,BU.last_login,BU.avatar,BW.weblog
FROM bhost_users BU
LEFT OUTER JOIN bhost_weblogs BW
ON BU.u_id = BW.u_id
ORDER BY BU.username ASC";

$result = mysql_query($select,$link) or die ('Erreur : '.mysql_error() );
$total = mysql_num_rows($result);

// si on a récupéré un résultat on l'affiche.
if($total) {
// debut du tableau
echo '<table width="780" border="0" cellspacing="0" cellpadding="0">'."\n";
// première ligne on affiche les titres prénom et surnom dans 2 colonnes
echo '<tr>';
echo '<th height="24" background="images/TOP.jpg" bgcolor="#C4CBDE" align="left"><b><u><FONT size=2>Avatar</u></b></th>';
echo '<th height="24" background="images/TOP.jpg" bgcolor="#C4CBDE" align="left"><b><u><FONT size=2>Speudo</u></b></th>';
echo '<th height="24" background="images/TOP.jpg" bgcolor="#C4CBDE" align="left"><b><u><FONT size=2>Date d inscrition</u></b></th>';
echo '<th height="24" background="images/TOP.jpg" bgcolor="#C4CBDE" align="left"><b><u><FONT size=2>Derniere connexion</u></b></th>';
echo '<th height="24" background="images/TOP.jpg" bgcolor="#C4CBDE" align="left"><b><u><FONT size=2>Blog</u></b></td>';
echo '</tr>'."\n";
// lecture et affichage des résultats sur 2 colonnes, 1 résultat par ligne.
while($row = mysql_fetch_array($result)) {
echo '<tr>';
if($row[avatar] == "") {
echo '<td>'."<img src='../images/noavatar.gif' border='0' class='avatar' width='55' height='55'>".'</td>';
} else {
echo '<td>'."<img src='$row[avatar]' border='0' class='avatar' width='55' height='55'>".'</td>';
}
echo '<td>'."<FONT size=2><a href=profile.php?u=$row[username]>$row[username]</a>".'</td>';
echo '<td>'.'<FONT size=2>'.date('d-m-Y', $row["signup_date"]).'</td>';
echo '<td>'.'<FONT size=2>'.date('d-m-Y', $row["last_login"]).'</td>';
if($row[weblog] == "") {
echo '<td>'."Pas de blog".'</td>';
} else {
echo '<td>'."<FONT size=2><a href=index.PHP?w=$row[weblog]>Voir Blog</a>".'</td>';
}
echo '</tr>'."\n";
}
echo '</table>'."\n";
// fin du tableau.
}
else echo 'Pas d\'enregistrements dans cette table...';

// on libère le résultat
mysql_free_result($result);

?>
</span></td>
</tr>
</table>
</div>

<div id="pied">
<p class="piedcont">Copyright © : <a href="#">Votre site</a></p>
<noscript>
<p class="piedcont">
<br />Kit Graphique :</p>
</noscript>
</div>

</div>


</body>


</php>