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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T10:32:12+00:00 2026-06-08T10:32:12+00:00

Iam making my own custom login in wordpress using wp_signon function. Whenever a user

  • 0

Iam making my own custom login in wordpress using wp_signon function. Whenever a user enters his credentials, another page is called using ajax. In that page, i check the users credentials, and log the user in using wp_signon function. Then a confirmation is sent and the current page captures it and displays that the user is successfully logged in. The code works in Chrome and Firefox but doesnot work in IE. This is the code in the AJAX file. The current page gets a response saying the user is logged in, but when i refresh it still shows the user is not logged in. 🙁 stuggling with it for days. Help me please

    $creds = array();
    $creds['user_login'] = $user;
    $creds['user_password'] = $password;
    $creds['remember'] = $remember;
    $user = wp_signon( $creds, true );
    if ( is_wp_error($user) ){
        echo "Invalid Username or Password";
    }
    else {
        $current_user = wp_get_current_user();
        $userid=$current_user->ID;
        mysql_pconnect($dbhost,$dbuser,$dbpass) or die ("Unable to connect to MySQL server");
        $dbquerry= 'select `login` from wp_users where user_login="'.$_GET['user'].'"';

        $result=mysql_db_query($dbname,$dbquerry);
        list($login)=mysql_fetch_array($result);
        if($login==1) {
            echo "change";
        }
        else {
            echo "success";
        }
    }

This code work well in Chrome and firefox and not in IE

  • 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-08T10:32:14+00:00Added an answer on June 8, 2026 at 10:32 am

    Finally found out the culprit and solved the problem 🙂 IE caches AJAX requests. So whenever you use AJAX call to set login cookies, you are in for a trouble in IE. Beware!!!!! In your ajax call fill in a random number in the URL so that IE wont catch

    In the Ajax call inserted this

        var d = new Date();
        var n = d.getTime();
        req.open("GET", "something.php?user"+username+"&x="+n);
    

    By doing this IE wont cache the AJAX request

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

Sidebar

Related Questions

I am working on making my own custom CMS in PHP by hand and
I'm making my own custom server software for a game in Java (the game
I am making a clock using Raphael with my own. I created a big
i am making my own framework and would like to allow easy direct access
I am making my own installer and it's almost complete. The only thing lacking
I am making a game that has its own level editor. The editor simply
Iam making an app which has one index.php file. I also have these other
Iam getting OutOfMemoryException while making remote method call. RemoteEntity.SetLocalStore(DATASET); passed value is dataset. Note
Iam trying to compile a file of the following format by making a parser
I have a custom PageBase class that I am using for all of 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.