HTTP POST does not work after switching DNS

AlamoPS

Recently I swapped out a GoDaddy hosting and directing the requested DNS server to another mine. The direction is pointing into a folder.

What happens is that I'm trying to make a validation by ajax login before submitting the form to actually login.

The AJAX calls and executes a php but data is not passed by POST as if they were lost in the request. However, PHP is running in the AJAX request and even returns a message as I wanted, but the data is sent through ajax as if they got anything.

I tried to send the form by post Direct and caused the same error. I'm believing in the possibility that the POST is getting lost in directing the DNS. Is it possible?

Anyway, I'm leaving the HTML, AJAX and PHP: Note: I'm using CodeIgniter. HTML:

<?php echo form_open('usuarios/login', array('method' => 'post', 'id' => 'form-login')) ?>
    <div class="boxform">
        <label for="loginnome">Usuário ou E-mail:</label>
        <input type="text" name="loginnome" required id="loginnome" placeholder="Usuário ou E-mail" title="Usuário ou E-mail">
    </div>
    <div class="boxform">
        <label for="loginsenha">Senha:</label>
        <input type="password" name="loginsenha" required id="loginsenha" placeholder="Senha" title="Senha">
    </div>
    <div class="boxform">
        <input type="submit" class="button submit-claro" value="Logar" title="Logar">
    </div>
<?php echo form_close(); ?>

AJAX:

$('#form-login').validate({
    rules: {
        loginnome: {
            required:true,
            maxlength:100
        },
        loginsenha:{
            required:true,
            maxlength:30
        }
    },
    submitHandler: function( form ){

        $.ajax({
            type        : "POST",
            url         : get_url()+"usuarios/validar_login",
            dataType    : 'json',
            data        :       {
                'usuario'   : $('#loginnome').val(),
                'senha'     : $('#loginsenha').val()
            },
            success     : function(data){
                console.log(data);
                if (data.usuario === false) {
                    $('.msg_error p').show();
                    $('.msg_error p').html('');
                    $('.msg_error p').html('Usuario inválido');
                    $('#loginnome').val('').focus();
                }
                else {
                    if (data.senha === false) {
                        $('.msg_error p').show();
                        $('.msg_error p').html('');
                        $('.msg_error p').html('Senha incorreta');
                        $('#loginnome p').val('').focus();
                    }
                    else {
                        inicia_sessao(data.url);
                    }
                }
            }
        });

        //return false;
    }
});

PHP:

public function validar_login()
{
    $usuario        = $this->input->post('usuario');
    $senha          = $this->input->post('senha');

    $return         = $this->usuario->valida_login($usuario,$senha);
    $return['url']  = site_url();
    echo json_encode($return); die;
}
sush

You may have to contact your provider to resolve this as it is directly / indirectly under their control.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

HTTP POST does not work after switching DNS

From Dev

Outlook new message does not work after switching to office365

From Dev

Switching the system does not work

From Dev

How does HTTP POST work in Polymer?

From Dev

Why does website not load after transferring to different hosting provider and switching from https to http?

From Dev

HTTP Post from Meteor Server does not work - syntax problems?

From Dev

Http post to server from Android app does not work

From Dev

HTTP Post via Android-Java does not work

From Dev

How exactly does DNS work?

From Dev

AngularJS code does not work after a change in HTTP GET URL

From Dev

Websocket not working after switching https from http

From Dev

Swift: Why does switching over textfields work?

From Dev

Symfony 2, switching language does not work

From Dev

Ubuntu 20.04 DNS not work after connect to VPN

From Dev

DNS does not work equally on Windows and Linux

From Dev

nginx DNS redirect: how does it work

From Dev

How to work with HTTP Post in android?

From Dev

Ionic Cordova $http POST data works well in browser but does not work in my android phone

From Dev

Will old PayPal buttons continue to work after switching to PayPal Express?

From Dev

Ajax POST request does not work

From Dev

isset($_POST[deletePhoto]) does not work

From Dev

Angular POST request does not work

From Dev

JAGS - pow function does not work properly in mixture model with label switching

From Dev

Stagger animation does not work when switching to list of the same length

From Dev

How can I access Windows shares after changing DNS servers (e.g. switching to OpenDNS)?

From Dev

jqGrid does not refresh after post

From Java

$http get parameters does not work

From Dev

.htaccess HTTP forcing does not work

From Dev

How does http://to./ work?

Related Related

  1. 1

    HTTP POST does not work after switching DNS

  2. 2

    Outlook new message does not work after switching to office365

  3. 3

    Switching the system does not work

  4. 4

    How does HTTP POST work in Polymer?

  5. 5

    Why does website not load after transferring to different hosting provider and switching from https to http?

  6. 6

    HTTP Post from Meteor Server does not work - syntax problems?

  7. 7

    Http post to server from Android app does not work

  8. 8

    HTTP Post via Android-Java does not work

  9. 9

    How exactly does DNS work?

  10. 10

    AngularJS code does not work after a change in HTTP GET URL

  11. 11

    Websocket not working after switching https from http

  12. 12

    Swift: Why does switching over textfields work?

  13. 13

    Symfony 2, switching language does not work

  14. 14

    Ubuntu 20.04 DNS not work after connect to VPN

  15. 15

    DNS does not work equally on Windows and Linux

  16. 16

    nginx DNS redirect: how does it work

  17. 17

    How to work with HTTP Post in android?

  18. 18

    Ionic Cordova $http POST data works well in browser but does not work in my android phone

  19. 19

    Will old PayPal buttons continue to work after switching to PayPal Express?

  20. 20

    Ajax POST request does not work

  21. 21

    isset($_POST[deletePhoto]) does not work

  22. 22

    Angular POST request does not work

  23. 23

    JAGS - pow function does not work properly in mixture model with label switching

  24. 24

    Stagger animation does not work when switching to list of the same length

  25. 25

    How can I access Windows shares after changing DNS servers (e.g. switching to OpenDNS)?

  26. 26

    jqGrid does not refresh after post

  27. 27

    $http get parameters does not work

  28. 28

    .htaccess HTTP forcing does not work

  29. 29

    How does http://to./ work?

HotTag

Archive