I have modified a script that uses PHP, mysqli, and html to create a chat. Is there any way I can change it so it does not do meta refreshes to get the annoying blink from the loading?
If not, is there any other easy to work with chat script for another language I can use to access my mysql database?
Here is an example of what I have now:
Code:<META HTTP-EQUIV=Refresh CONTENT="8;url=chatmsgs2.php"> <link rel=stylesheet> <body background='bgic.JPG' border=1 bordercolor=white> <?php $csel = mysqli_query($db, "select * from chat order by id desc limit 50") or die("Could not get user stats"); while ($chat = mysqli_fetch_array($csel)) { if($chat['viewer']!=""){ if($chat['viewer']==$_COOKIE['member_id']){ print "<p align=left>$chat[user] $chat[chat]<p align=left>"; } }elseif($chat['chat'] == "") { if($chat['sender']==$userstats3['Playername'] || $chat['reciever']==$userstats3['Playername']){ $blahblah=mysqli_fetch_array(mysqli_query($db, "select * from Users where playername='$chat[reciever]'")); if($blahblah['ID']==""){ print "<p align=left><font style=\"color: gray\">No such user.</font><p align=left>"; }else{ if($chat['reciever']==$userstats3['Playername']){ print "<p align=left><font style=\"color: gray\"><a href='chat.php?Dude=$chat[sender]' target=_parent><font style=\"color: gray; text-decoration: underline;\">$chat[sender]</font></a> to $chat[reciever]$chat[message]</font><p align=left>"; }else{ print "<p align=left><font style=\"color: gray\">$chat[sender] to <a href='chat.php?Dude=$chat[reciever]' target=_parent><font style=\"color: gray; text-decoration: underline;\">$chat[reciever]</font></a>$chat[message]</font><p align=left>"; } } } }else{ print "<p align=left>$chat[user] $chat[chat]<p align=left>"; } } ?>




Reply With Quote
Bookmarks