Atualizacao da pagina,com select em db
Ola esse é meu codigo,preciso de uma solução que me ajude,a verificar se existe algum dado mais recente com o "id > do ultimo dado pego" né,é q seja sem refresh mas adicionando.
Esse meu codigo ele tem um problema ele fica atualizando toda hora,e fica sumindo e voltando as "imagem",etc
<?php
require_once("config.php");
header('refresh:2; url=mensajes.php');
?>
<style type="text/css">
<!--
body {
/ background-color: #FF9933;/
}
-->
</style>
<script language="javascript">
</script>
<?php
$re=mysql_query("select * from mensajes order by id desc LIMIT 5");
while($f=mysql_fetch_array($re)){ ?>
<table width="450" border="0" align="center" cellpadding="5" cellspacing="0" >
<tr bgcolor="#FFFFFF">
<td width="100" rowspan="3" valign="top"><img src="image/<?php $user = mysql_query("select * from usuario WHERE nome = '$f[alias]'"); print @mysql_result($user,0,usuario) ;?>.png" width="97" height="97" border="0" /></td>
<td width="350"><?php print "<span class='usuario'>".$f['alias']."</span>" ?></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="47"><?php
echo "<span class='mensaje'>".htmlentities($f['mensaje']); ?></td>
</tr>
<tr bgcolor="#FFFFFF">
<td><?php print "<scpan class='fecha'></span>".$f['fecha']."<br />" ?></td>
</tr>
</table>
<br />
<?php }
?>Discussão (2)
Carregando comentários...