Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3672194
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T02:34:45+00:00 2026-05-19T02:34:45+00:00

i am using ajax chat from AJAX Chat they have no database to register

  • 0

i am using ajax chat from

AJAX Chat

they have no database to register users and channels, instead they are manually inserted in lib/data/ folder. I want to create my own table for users and channels registration.

Can anyone help me out doing this, caz i cant find anything on internet. Available things are only integration with other forums. But i dont need any forum for this.

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T02:34:45+00:00Added an answer on May 19, 2026 at 2:34 am

    I downloaded the file and the registered user has the following parameters:

    // Sample registered user:
    $users[3] = array();
    $users[3]['userRole'] = AJAX_CHAT_USER;
    $users[3]['userName'] = 'user';
    $users[3]['password'] = 'user';
    $users[3]['channels'] = array(0,1);
    

    So thats the fields you need to create in your MySQL database:

    CREATE TABLE `DATABSENAME`.`users` (
    `id` INT NOT NULL AUTO_INCREMENT ,
    `userRole` VARCHAR( 50 ) NOT NULL ,
    `userName` VARCHAR( 50 ) NOT NULL ,
    `password` VARCHAR( 50 ) NOT NULL ,
    PRIMARY KEY ( `id` ) ,
    ) 
    

    and

     CREATE TABLE `DATABSENAME`.`channels` (
    `id` INT NOT NULL AUTO_INCREMENT ,
    `channelname` VARCHAR( 50 ) NOT NULL ,
    PRIMARY KEY ( `id` ) ,
    ) 
    

    and

     CREATE TABLE `DATABSENAME`.`users_channels` (
    `id` INT NOT NULL AUTO_INCREMENT ,
    `number` VARCHAR( 50 ) NOT NULL ,
    `userName` VARCHAR( 50 ) NOT NULL ,
    PRIMARY KEY ( `id` ) ,
    ) 
    

    Then you have to load each user into your users.php something like:

    $con = mysql_connect("localhost","username","password");
    if (!$con)
      {
      die('Could not connect: ' . mysql_error());
      }
    
    mysql_select_db("my_db", $con);
    
    $result = mysql_query("SELECT * FROM users");
    
    $j=4
    while($row = mysql_fetch_array($result))
      {
      $users[$j]['userRole']=$row['userRole'];
      $users[$j]['userName']=$row['userName'];
      $users[$j]['password']=$row['password'];
      $j++;
      }
    
    
    for($j=4;$j<(count($users)-4)$j++){
    $result = mysql_query("SELECT * FROM users_channels WHERE userName='".$users[$j]['userName']."'");
    
    $k=0;
    while($row = mysql_fetch_array($result))
      {
         $k++;
         $user[$j]['channels'][$k]=$row['number'];
      } 
    }
    mysql_close($con);
    

    Then you do practically the same for channels.php.
    The second part involves making the database entries when a user registers, not sure how that works and which file that involves but if you know the application you should probably find it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been working on on an AJAX chat application using php, mysql. It's
I have made a simple chat script using jquery and AJAX but the huge
I have made an AJAX chat using Javascript, PHP, and MySQL. I send the
I am using ajax jquery to send data to php, as data I am
I'm using AJAX to get data for several business-card like divs on my page
I am using ajax calendar extender for 'From date' and 'To date' text box,
I am using AJAX to send form data to a server php file that
As part of an ajax chat room (using prototype framework) I am working on
A chat application can be implemented using a database (browser send a request conterminously
I'm creating a chat application, I have the page check for updates from my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.