This is my php code...........
$root = "http://localhost/";
$sql = mysql_query("SELECT * FROM mychat WHERE (too='$mid' AND froom='$uid') OR (too='$uid' AND froom='$mid') ORDER BY id ASC");
while($ro=mysql_fetch_array($sql)){
$from = $ro['froom'];
$to = $ro['too'];
$text = $ro['text'];
$time = $ro['time'];
$last_count = $ro['last_count'];
echo '<li class="chat_li">
<font face="MS Sans Serif" size="1">'.$froom.'</font></a> says: '.wordwrap($text, 1000,"<br>\n", true).'
<br><font size="1" color="#777777">'.$time.'</font>
</li>';
}
but it is showing only user1 name and all text but not showing the appropriate user with text msg............
how can i fix that
my database table.........
id, froom, too, text, time
and here is my output.......... if user1 types........[ ssss] and user2 types.....[ 1244]
output is always.
user1says: ssss 1min ago
user1says: 1244 50sec ago