my php code working fine in localhost ...but i have uploaded on server my php administratr login page only validated but not redirect to admin page system browser says error occured ...but other users login page is working fine ...wat can i do >>> wats actually problem ??

What error does the browser say is occuring?

browser it shows only "an error occured "

Maybe you're ending up in an infinite redirect loop? Have you tried disabling all redirects and see if anything happens?

okay now i was disabling loops ...stills the error is coming

my problem was server admin login validated but cant redirect into admin page ... other login pages are working fine ...but in my localhost admin and all login pages working perfectly ...

Maybe you're trying to redirect to a local page while not working locally?

its working fine an local page but i need to run on server ...

My PHP Page JS login validation code ..it can be valid "success" and page is redirected in localhost at the sametime it can be valid wrong in server hosting ...

setTimeout(function()
                {
                    var random_pct = 25 + Math.round(Math.random() * 30);

                    // The form data are subbmitted, we can forward the progress to 70%
                    neonLogin.setPercentage(40 + random_pct);

                    // Send data to the server
                    $.ajax({
                        url: baseurl + 'index.php?login/ajax_login',
                        method: 'POST',
                        dataType: 'json',
                        data: {
                            email: $("input#email").val(),
                            password: $("input#password").val(),
                        },
                        error: function()
                        {
                            alert("An error occoured!");
                        },
                        success: function(response)
                        {
                            // Login status [success|invalid]
                            var login_status = response.login_status;

                            // Form is fully completed, we update the percentage
                            neonLogin.setPercentage(100);


                            // We will give some time for the animation to finish, then execute the following procedures    
                            setTimeout(function()
                            {
                                // If login is invalid, we store the 
                                if(login_status == 'invalid')
                                {
                                    $(".login-page").removeClass('logging-in');
                                    neonLogin.resetProgressBar(true);
                                }
                                else
                                if(login_status == 'success')
                                {
                                    // Redirect to login page
                                    setTimeout(function()
                                    {
                                        var redirect_url = baseurl;

                                        if(response.redirect_url && response.redirect_url.length)
                                        {
                                            redirect_url = response.redirect_url;
                                        }

                                        window.location.href = redirect_url;
                                    }, 400);
                                }

                            }, 1000);
                        }
                    });

try:
1. logout or logout with http://www.yourdomain.com/wp-login.php?action=logout
2. disable all plugins
3. clear cookies/cache
4. exit browser

just for troubleshooting purposes try:
- switching to the default theme by renaming your current theme's folder in wp-content/themes using FTP or whatever file management application your host provides.

  • resetting the plugins folder by using FTP or whatever file management application your host provides. Sometimes, an apparently inactive plugin can still cause problems.

  • renaming or deleting the .htaccess file after making a backup of this file

I also try out disabling all plugins , deleting cookies and restart my browser still wont change anything ...

You said -browser it shows only "an error occured " . Of course this is an extremely ambiguous message for everything. Do you mean that the browser alerted that message ?. In your Js you have the same message alerted in Ajax error. Did you tried to output (alert or log) the error itself and not a message that there has been an error ? .

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.