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?
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.
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.chatro omID# 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.
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.chatro
order by entrytime
</cfquery>
<meta http-equiv="refresh" content="#session.refresh#
<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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Answer accepted
ASKER
This should get me started...thanks