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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T11:23:47+00:00 2026-05-15T11:23:47+00:00

I have some php that checks if a user is logged in and returns

  • 0

I have some php that checks if a user is logged in and returns false, this is then passed via ajax to the browser to let the user know he needs to log in.

Works perfect in FF and the alert returns ‘true’ but in IE, it returns ‘null‘ no matter what I do

// Check for logged in user
    $.getJSON(baseUrl+"index.php/login/checkState", function(data) {
                    alert(data);
        if(data==true){
            dologInState();
        }else{
            dologOutState();
        }
    });

PS: the string returned from PHP is simply false

Any ideas?

  • 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-15T11:23:47+00:00Added an answer on May 15, 2026 at 11:23 am

    I eventually managed to sort this out. The problem was not the ajax call to begin with.

    It was that the ajax calls were getting its true and false values from php doing a simple “is the authentication cookie present” check.

    I cant tell you how or why this was working in FF and acting up in IE and it could have been something I did – but – since 90% of the application is built out of js and ajax calls the solution was to handle all cookie checks with Java script and not with PHP at all.

    Ive even got the cookie to store json strings now, its beautiful.

    Thanks for all the help guys, much appreciated.

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

Sidebar

Related Questions

I have some PHP code that generates a calendar and then outputs html to
Thanks for helping with this. I have a script that checks logins and then
I have a PHP script that tests is the user is logged in, for
I have some PHP code that generates dynamic tables of data on the fly.
I have some PHP code that is designed to make a spreadsheet with formulas
So I have some PHP code that looks like: $message = 'Here is the
I have some old apps written in PHP that I'm thinking of converting to
Hi have some forms that I want to use some basic php validation (regular
I have some issues with a PHP file that is not working properly. The
I have some setup code in my functions.php file that sets permalinks and adds

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.