Pass GET parameter through AJAX to activate page

1

I need to do the redirect after doing some commands in php I need to load an ajax.

The link you submit to PHP:

href="ajax/deletaPessoaVinculo.php?a=1&c=MEMBR&pb=3&p=vinculo.php?c=MEMBR"

After this I get in the php of the deletaPessoaVinculo.php

$w_COD_IDENT_VINCU = ( isset($_GET['c']) ? $_GET['c'] : "" );
$w_COD_IDENT_PESSO = ( isset($_GET['pb']) ? $_GET['pb'] : "" );
$w_acao = ( isset($_GET['a']) ? $_GET['a'] : "" );
$w_pagina = ( isset($_GET['p']) ? $_GET['p'] : '');

I do what I need to do on the page and at the end I do:

header('Location: ajax/'. $w_pagina);

But it is not returning.

I actually want to delete something, and when I remove I want to reload on the page.

    
asked by anonymous 19.01.2016 / 18:49

1 answer

1

This is happening, probably because the last parameter p is with url p=vinculo.php?c=MEMBR , and there is a ? , which means that queryString will start, but this part has already started, test let the url parameter, getting:

href="ajax/deletaPessoaVinculo.php?a=1&c=MEMBR&pb=3&p=vinculo"

and giving the redirect do this:

header('Location: ajax/'. $w_pagina . ".php?c=" . $w_COD_IDENT_VINCU);

Abs.

    
19.01.2016 / 19:14