Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 358
  • Last Modified:

pre-written message chat code

I am trying to find code that will allow users who come to my website to click one of three buttons which will display a pre-written message assigned with that button AND their name (entered into a text box) in a live chat box.

So basically a user goes to the site and puts in their first name "John" then clicks buttons 1, 2, or 3 and the pre-written message associated with that button shows up instantly in a central chat window to anyone else viewing the page at the same time.

Does anyone know a short code that will do this? Or any pre-written code out there to make this happen? Thank you.
1 Solution
Ludwig DiehlSystems ArchitectCommented:
Let me know if I understand. You want someone to login to a chat service u provide, then on everyone else's center screen should appear a message or whatever showing he's just logged in?. If that's the case, then u can achieve this using a database (user and loggin table) or a text file where everyone that is logged in will append data onto it. Logged users then will access such file at regular intervals to check if a user has just logged in ( flag or something...). U can do that with ajax.
Please tell me if that's what u are looking 4.

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now