I have to enter the username and password twice to enter the system

1

I have a page index.php for user login and password that validated its fields with jquery.validate and with this information I get access to the system, but I must always type twice the user and password to access and that generates problems with the users ... everything worked great, but I had to pass my code to a new hosting and they told me that it is a header error, but I really do not know what it is ... there I pass part of the code for their help .

index.php

<form role="form" id="acceso" name="acceso">
                                        <fieldset>
                                            <label class="block clearfix">
                                                <span class="block input-icon input-icon-right">
                                                    <input type="email" class="form-control" id="email" name="email" placeholder="Correo Electrónico" value="" />
                                                    <i class="ace-icon fa fa-envelope"></i>
                                                </span>
                                            </label>

                                            <label class="block clearfix">
                                                <span class="block input-icon input-icon-right">
                                                    <input type="password" class="form-control" id="password" name="password" placeholder="Password" value="" />
                                                    <i class="ace-icon fa fa-lock"></i>
                                                </span>
                                            </label>

                                            <div class="space"></div>

                                            <div class="clearfix">
                                                <button id="btn-ingresar" name="btn-ingresar" class="btn btn-lg btn-primary btn-block">Ingresar</button>
                                            </div>

                                            <div class="space-4"></div>
                                        </fieldset>
                                    </form>

login.validate.js

$if(msj == 9){
                                                        $(form).find('#btn-ingresar').attr("disabled", "disabled").attr("value", "Ingresando...");
                                                        $('#alertBoxes').html('<div class="alert alert-success"></div>');
                                                        $('.alert-success').hide(0).html('Acceso correcto, ingresando al sistema...');
                                                        $('.alert-success').slideDown(timeSlide);
                                                        setTimeout(function(){ window.location.href = "home.php?c=index"; },(timeSlide + 1000));


                                    } 

should run everything and redirect to the home.php? c = index page, but return to index.php to re-enter the information and then enter the system without any problem ... Thanks for your help

    
asked by Gouvian Bautista 06.06.2018 в 20:53
source

1 answer

0

Difficult you can help with those few lines of code.

When do you load the validation jquery?

Take a look at this: link

It is very possible that you are giving other errors the code. Verify with the code inspector of your browser that there are no more errors.

    
answered by 06.06.2018 в 21:03