I really can't get this one, and it doesn't seem as obvious.
So, I'm trying to make a chat for my site, but first off, it isn't displaying the data. Second, here's a screenshot of the problem.
http://puu.sh/53ddT.png
Here's the code.
<?php
include_once('../include/session.php');
mysql_query("SELECT * FROM chat ORDER BY id DESC LIMIT 90'");
?>
<font color="<?
mysql_connect("*****", "*****", "*****") or
die("No se pudo conectar: " . mysql_error());
mysql_select_db("ni235658_1sql2");
$resultado = mysql_query("SELECT chatcolor FROM users WHERE username='".$rows[name]."'");
while ($fila = mysql_fetch_array($resultado, MYSQL_BOTH)) {
printf ("%s", smiles(BBcode($fila[chatcolor])));} ?>">
<?php echo $rows['name']; ?>:</font> <?php echo smiles($rows[message]) ?><br>
Also, it doesn't notice that I ended the "font color" html code. Instead, before AJAX refreshing, says ">: in blue, then turns to just a :.
Here is my table.
http://puu.sh/53dxg.png
Proof that it does in fact have rows.
http://puu.sh/53dIy.png
So it IS inserting, just not displaying. Please help. Thanks.