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

  • SEARCH
  • Home
  • 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 8948131
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T12:54:59+00:00 2026-06-15T12:54:59+00:00

I am using joomla 1.5. I have a separate code which is in the

  • 0

I am using joomla 1.5. I have a separate code which is in the same domain but in an another folder. I am accessing that folder within my joomla code by making use of iframe. Now I have to send the session value from joomla application to iframe and I am doing that by the following code.

echo '<iframe src="https://localhost/demo/quiz/quiz_main.php?u_d='.$user->id.'" width="910" height="885" style="background-color:transparent"></iframe>';

where $user->id is the registered user’d id and obviously this page will open if user logs in.

Then in the quiz_main.php page I am checking the value of u_d and according to that I am controlling the system.
Now the problem is suppose, I opened two tabs in the same browser with the same url and log in with same user id. Now log out from one tab. Then go to the other tab. User can perform any action for that small application which is running inside the iframe, until the page is not refreshed . But it should not be.

Please help me how to fix this issue.

  • 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-15T12:55:00+00:00Added an answer on June 15, 2026 at 12:55 pm

    You have to perform the check server side anyway, so in quiz_main.php you’ll need something like

    <?php
        if(!user_is_logged_in())
            // Redirect to login
    ?>
    

    To prevent the user from performing any actions that will affect data on the server.

    You can also do a check client side using JavaScript. You can poll the server every n seconds to check if the user still is logged in, and if not redirect the user to the appropriate page.

    Example below with jQuery

    function logged_in() {
        $.ajax({
            url: '/logged_in.php',
            type: 'post',
            success: function(data) {
                data = $.parseJSON(data);
                if(data['logged_in'] != true)
                    window.location('login.php');
                else
                    setTimeout('logged_in()', 5000); // calling itself in 5 seconds.
            }
        });
    }
    $(document).ready(function() {
        logged_in(); // Calling first time when the document is ready.
    });
    

    Just a rough sketch on how this could be done. You’ll need a logged_in.php to handle to your request of course.

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

Sidebar

Related Questions

I have created web-application using Joomla 2.5. In that I have used Joomla user
I have a joomla isntallation which displays some articles normally but when i added
I have just launched a site (using Joomla and a custom template), which doesn't
I'm using Joomla 1.5. I have created a custom component that pulls data out
I am using Joomla 1.5 . I have developed a custom component that's basically
I am using Joomla 1.5 and i have tried a lot but could not
Using Joomla vers. 2.5 I have a Custom Html like that : <table border=0
I have used mysql mysql_real_escape_string($somevariable) in my code developed using Joomla! api. Everything is
I am making changes on a website database I am developing using joomla 2.5
We are using Joomla 1.5.21 and JCE 1.5.7 and have some trouble with the

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.