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 8139943
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T11:59:47+00:00 2026-06-06T11:59:47+00:00

I have created a php/mysql based chat page.It is like gmail chat.once i click

  • 0

I have created a php/mysql based chat page.It is like gmail chat.once i click on a online member,chat box will open in the bottom right side. I have a seperate page for chat which includes javascripts and css’s. It works well.

The problem i have is, I need to add that chat page to all my webpages.Because i have some various areas in my website. And i want my members to continue their chat even they visit to another page in my website.

problem arise at that point.
I Used
<?php include('pathtomychat.php');?> in all my webpages. Online friends are appearing correctly.but if i started a chat with a person and suddenly visit to another page, that opened chat box is no longer visible in new page. if i again click the member i have chatted, the chat box is appearing, but my chat messages won’t receive to the member.

I have tried thousands of time using googling for an answer but i couldn’t.

I saw there are so many chat scripts that works well in multiple pages by just using small javascript snippets.how they do that?
I can’t solve this problem. I’ll be thankful if you can tell why this is happens and what should i do to overcome this situation.

Thank you Very much

  • 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-06-06T11:59:49+00:00Added an answer on June 6, 2026 at 11:59 am

    I can’t answer why someone put a negative. I guess because you didn’t show any code…

    Anyway, onto your question. When you go to a new page, you’re reloading your include "pathytomychat.php"; Which kills whatever was opened and just reloads it. You would have to include some way of checking to see if that window is open and then checking if it’s open…

    off the bat I would so something like this inside your pathtomychat.php

    //Check to see if any windows are open
    if(isset($_SESSION['window_open']) && $_SESSION['window_open'] == 'yes') {
        openChatWindow();
    }
    
    function openChatWindow() {
        $_SESSION['window_open'] = 'yes';
        //the rest of the code that actually opens the window
    }
    

    Of course, if you’re opening the window with JS, you’ll need to make sure you set the session that way as well. You could also use Cookies…

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

Sidebar

Related Questions

hi i created a simple php/mysql/Ajax chat application and I have a few questions.
i have created a forum using php/mysql and users login through facebook using php
I have created a php table like so: echo <table border = '0' cellpadding
I have a site based on php/mySQL where publishers had inserted a lot of
I'm after a model-based database class for PHP/MySQL. But it must have one particular
So I have a MySQL query that is being created dynamically based on parameters
i am developing a PHP/MYSQL search module, where i have to search tables based
I have the following tables for a php mysql based quiz application: QUESTION id
I'm creating a website(PHP + MySQL based) with a list events. I currently have
I have created PHP GD image for captcha, file called image.php each time it

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.