hello everybody! the function nick of chatting I work, I would signal that by chatting, but when I do not write, and you refresh the page, I always send the same message. as the system is the problem?
Function Nick Enters Chatting
Collapse
X
-
im guessing your saying eveytime the page refreshes and you dont say anything then it tells you ...you have entered chat. if so something like this should sort it out
Code:$check = mysql_fetch_array(mysql_query("SELECT uid FROM ibwf_chonline WHERE uid='".$uid."', rid='".$rid."'")); if($check[0]!=$uid){ ////////////then enters chat code }
(make sure addtochat($uid, $rid) function is underneath this code tho)
-
<div class='quotetop'>QUOTE (something else @ Jan 24 2009, 03:21 PM) <{POST_SNAPBACK}></div>ill try this lolim guessing your saying eveytime the page refreshes and you dont say anything then it tells you ...you have entered chat. if so something like this should sort it out
Code:$check = mysql_fetch_array(mysql_query("SELECT uid FROM ibwf_chonline WHERE uid='".$uid."', rid='".$rid."'")); if($check[0]!=$uid){ ////////////then enters chat code }
(make sure addtochat($uid, $rid) function is underneath this code tho)[/b]
Comment
-
does not work! Once you refresh the page always repeated the same messageCode:addtochat($uid, $rid); $timeto = 86400; $timenw = time(); $timeout = $timenw-$timeto; $rooms = mysql_fetch_array(mysql_query("SELECT id, name FROM ibwf_rooms WHERE id='".$rid."'")); $rname = $rooms[1]; $nick = getnick_sid($sid); $check = mysql_fetch_array(mysql_query("SELECT uid FROM ibwf_chonline WHERE uid='".$uid."', rid='".$rid."'")); if($check[0]!=$uid); if ($action=="") { $me= getnick_uid($uid); mysql_query("INSERT INTO ibwf_chat SET chatter='1', who='".$who."', timesent='".time()."', msgtext='$me entered the JAKENPOY Chat room', rid='".$rid."'"); mysql_query("INSERT INTO ibwf_chat SET timesent='".time()."', chatter='".$uid."', text='".$msg."'"); echo "<head>"; echo "<title>$rname</title>"; echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">"; $unreadpopup=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_popups WHERE unread='1' AND touid='".$uid."'")); if ($unreadpopup[0]<1) { echo "<meta http-equiv=\"refresh\" content=\"20; url=chat.php?time="; echo "".date("dmHis").""; echo "&sid=$sid&rid=$rid&rpw=$rpw\">";
Comment
-
Enter what ? lmao
Code:if ($action=="") { $me= getnick_uid($uid); mysql_query("INSERT INTO ibwf_chat SET chatter='1', who='".$who."', timesent='".time()."', msgtext='$me entered the JAKENPOY Chat room', rid='".$rid."'"); mysql_query("INSERT INTO ibwf_chat SET timesent='".time()."', chatter='".$uid."', text='".$msg."'"); } if ($action=="nothing") { echo "<head>"; echo "<title>$rname</title>"; echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">"; $unreadpopup=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_popups WHERE unread='1' AND touid='".$uid."'")); if ($unreadpopup[0]<1) { echo "<meta http-equiv=\"refresh\" content=\"20; url=chat.php?time="; echo "".date("dmHis").""; echo "&sid=$sid&rid=$rid&rpw=$rpw\">";
make the script action=nothingVisit: Chat4u.mobi - The New Lay Of being a site of your dreams!
Visit: WapMasterz Coming Back Soon!
_______
SCRIPTS FOR SALE BY SUBZERO
Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders.
FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others...
_______
Info & Tips
php.net
w3schools.com
Comment
-
i give up on ppl learning to code always not listen or dont do it right or
just add and didnt careVisit: Chat4u.mobi - The New Lay Of being a site of your dreams!
Visit: WapMasterz Coming Back Soon!
_______
SCRIPTS FOR SALE BY SUBZERO
Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders.
FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others...
_______
Info & Tips
php.net
w3schools.com
Comment
-
Code:$timeto = 86400; $timenw = time(); $timeout = $timenw-$timeto; $rooms = mysql_fetch_array(mysql_query("SELECT id, name FROM ibwf_rooms WHERE id='".$rid."'")); $rname = $rooms[1]; $nick = getnick_sid($sid); if ($action=="") { $check = mysql_fetch_array(mysql_query("SELECT uid FROM ibwf_chonline WHERE uid='".$uid."', rid='".$rid."'")); if($check[0]!=$uid){ $me= getnick_uid($uid); mysql_query("INSERT INTO ibwf_chat SET chatter='1', who='".$who."', timesent='".time()."', msgtext='$me entered the JAKENPOY Chat room', rid='".$rid."'"); mysql_query("INSERT INTO ibwf_chat SET timesent='".time()."', chatter='".$uid."', text='".$msg."'"); } addtochat($uid, $rid); echo "<head>"; echo "<title>$rname</title>"; echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">"; $unreadpopup=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_popups WHERE unread='1' AND touid='".$uid."'")); if ($unreadpopup[0]<1) { echo "<meta http-equiv=\"refresh\" content=\"20; url=chat.php?time="; echo "".date("dmHis").""; echo "&sid=$sid&rid=$rid&rpw=$rpw\">";
Comment
Comment