Idea Needed From All Experts

Started on the old forum in July 2008 · view the original in the archive · old links redirect here

9 replies · 703 views · started 18 years ago · 1 min read

3 participants
learner Lead · 587 posts #1

hi i want make a simple chattie where a guest just enter name and enter room and chat and even smiley that is it, how and hwre i satrt can someone guide? xhtml only

Failure is not when a girls leaves you, its only when you let her go virgin. heheh!!

BEST MOBILE ADVERTISER

External image (may be gone)

opticalpigion Lead · 593 posts #3

Oh my.... great coder tht opticalpigion... He knws how 2 remove copyrights.... lol

excuse me i just give that download link i know that is script is gumchat version.

but i just give him what he looking for that's it. and im not great coder.but i will be ok?

djlee Developer · 224 posts #10

you'll need a table to hold all of the data.. create your database and create two tables .. one for chat messages one for users. fields something like (off the top of my head you will probably need more as and when you run into the need for um

chatmsgs => id, uid, text, added

users => id, username, last_access

thats basics .. if you want to enable Private messages, secure usernames with passwords for staff and other somewhat basic features then you will need other fields

you then need to create your login page.. simply a form with a username and submit button (as you have not specified such things as multiple chatrooms there is no need for chatroom selection at this point). process the form by taking the username, simply inserting it into the users table .. id is auto incremented remember also use a unix timestamp to get the last_access (last access holds the time of which the chatroom was last accessed or even just refreshed.. if this is greater than say 10 minutes u can say that user is logged off)

then your chat page comes.. simply select ALL from chatmsgs and if for mobile phones you would probably wanna limit it to say 10 messages (LIMIT 10) and order them by the time they was added of course. use a JOIN to select the usernames associated with each uid of the chatmsg.

then you need a form to submit a new message which is simple .. take the submitted message add the UID, the message and the time it was posted to the relevant fields in chatmsgs table and send um back to the main chatroom

i think thats basically it for a very very very basic chatroom ... i may have overlooked something but ive been awake for 24 hours so gimme a break 😛

if you wanna create a dual chatroom system where you have two similar scripts but a simple one for mobiles and a graphical one for pc users then thats pretty easy too (im working on something along those lines but its top secret lol)

if you want more help add me on msn djlee989@hotmail.co.uk ... chatrooms are one thing i actually enjoy coding because theres always something more you can add and its easy (mindless programming rocks after no sleep i assure you lol)

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close