How can I do that when it is detected? view = panel is added & hello = quetal & var = ko

0

Hello as the question says I would like to add & hello = quetal in the search engine.

here the line of the code:

$view = isset($_GET['view']) ? $_GET['view'] : 'panel';

What can I do here?

    
asked by 02.01.2018 в 22:48
source

1 answer

1

You could do something like this:

if (isset($_GET['view']) && $_GET['view'] == “panel” && !isset($_GET[“hola”])) {
  header(“location: “ . $_SERVER['REQUEST_URI'] . “&hola=quetal”);
}

What that code does (which should go to the beginning of the whole to avoid problems with redirection) is to check that the view parameter is there and has the value panel. And if that happens, then it is redirected to the same url by adding the new parameter hello with quetal value.

    
answered by 02.01.2018 / 23:14
source