Currently working on a chat website and i am trying to figure out how to allow an admin to click a link and send a particular member to another page. Mainly this is to kick a user out of a chatroom.
This is only for members of the site, so i will be using a database to pull which user to be kicked. The page they will be sent to is constant (kicked.php)
Any database functions i can probably figure out and code. I just dont know if there is a way to actually kick a specific user off a page by clicking a link. I know it can be done, since the function exists in chatrooms, just not this one.. yet. but im not sure if i can do it in php or if i need to tap into javascript, ajax, or something else.
Any help is greatly appreciated.
Jason
Send a user to another page by clicking a link - kick user
Moderator: General Moderators
- AbraCadaver
- DevNet Master
- Posts: 2572
- Joined: Mon Feb 24, 2003 10:12 am
- Location: The Republic of Texas
- Contact:
Re: Send a user to another page by clicking a link - kick user
Well for a chat web site there is most likely some client side javascript that checks the server periodically for new messages yes? So modify the javascript so that if it receives a special code instead of a message, act on that code. If the code is kick then use the javascript to redirect to the kicked.php page.
mysql_function(): WARNING: This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQLextension should be used. See also MySQL: choosing an API guide and related FAQ for more information.
Re: Send a user to another page by clicking a link - kick user
The chat room is flash based and action script 3 and i'm not so hot with flash. I was hoping to populate a members list on the page that it is embedded in, that way i can use php or something to do this whole kick task. Im starting to think i am going to have to learn action script 3 and do it in there. The main reason i want to keep it separate is that at some point i want to separate the cam from the chat room, and have just the video in flash and the chat room in php to reduce the server load on my flash server.