I'm finishing it up, by programming some administration functions.
I'm stuck on the kicking part.
I have a form that sets their status in the database to kicked or '1'
then when my hidden frame reloads itself to grab new messages (once per second) it checks to see if the users status is set to kicked... and if it is I want it to redirect them to a page named chatkick.php.
I can't use php header location because text has already been sent to the page. So I need to use javascript.
I tried this
Code: Select all
$sarray = mysql_fetch_array(mysql_query("e;SELECT status FROM chatusers WHERE username = '"e;.$_COOKIEї'username']."e;'"e;));
if($sarrayї'status'] == "e;1"e;){ ?><script language="e;javascript"e;>document.location.href = 'http://www.showmypro.com/chatkick.php'; </script><? }What command do I need to use?