frienZ, i saw some site have enter left show page.it means when some 1 enters n rum, it sayz username enters at time.same in lefting d rum. can ny 1 help me out to code this out?
help needed 4 cz
Started on the old forum in February 2010 · view the original in the archive · old links redirect here
temorary i do this by get function like if $GET_[ent==hi] {@mysql.......} but if anyone press f5 or refresh the page constantly, the rum got flooded. plz can ny one help me?
add in a check, either a multi check that checks for the last message being "user enters room" or a timed check something like
$r = mysql_query("SELECT COUNT(id) from chat WHERE sent > ".(time()-60)." AND txt = 'user enters room');
$c = mysql_result($r,0);
if($c == 0)
//=== add the enter announce query here
not the best way to do it, but based on what ive seen of the chatroom sql and code on here your not gonna get a perfect solution, it would be better if you assigned the enter txt to the user that way you could just select the users last message and do a check on it
yap thanks for theory; i did it with ma own way like $r = mysql_query("SELECT COUNT(id) from chat WHERE time > ". (time()-60)." AND msg = '$user enters room'); $c = mysql_result($r,0); if($c == 0 && $GET_[ent == hi]) @mysql_query............. Thanks.