Link to home
Start Free TrialLog in
Avatar of the_kid
the_kid

asked on

Chat Room

Does anybody know where I could find information on how to create a chat room, or how I would begin doing that?
Avatar of hansam
hansam

Actually Im in the process of creating one.  I have one created, but working on making it better and more effient.  So I might be able to help you.
You can also try Allaires tag Gallery http://devex.allaire.com/developer/gallery/index.cfm inwhich you can look at some already created chatrooms to see how they work.
Avatar of meverest
here is a cut and paste from a question i answered here previously:

just make a simple cf script (chatwindow.cfm) like this:

========================================
<cfif isdefined('form.text')>
<cfquery dsn="....>
 (delete old text here)
</cfquery>

<cfquery dsn="....>
insert into chattext(entrytime, userID, chatroomID, text)
values(#now()#, #session.userID#, #session.chatroomID#, #form.text#)
</cfquery>
</cfif>

<cfquery name=chatwindow>
select chattext.entrytime, chattext.text, users.username
from users, chattext
where chatroomID=#session.chatroomID# and chatwindow.userID = users.userID
order by entrytime
</cfquery>

<meta http-equiv="refresh" content="#session.refresh#; URL=chatwindow.cfm">

<cfoutput>
#chatwindow.entrytime# #chatwindow.username# #chatwindow.text#<br>
</cfoutput>

<form action=addtext.cfm method=post>
<input name=text><input type=submit value=submit>

========================================
i can work out the tables and the session variables if you want to give more points ;-)

cheers.


ASKER CERTIFIED SOLUTION
Avatar of meverest
meverest
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of the_kid

ASKER

Answer accepted
Avatar of the_kid

ASKER

This should get me started...thanks