PHP does not return the second parameter via URL in Google Chrome

0

It sounds silly, but it's true.

A url: link

PHP code for this file

echo $_GET["a"];
echo $_GET["b"];

The result: us

What's wrong?

  

This happens only in the browser Google Chrome . In others, the result is expected.

    
asked by anonymous 10.04.2017 / 15:03

1 answer

1

Try to get the parameters in this way, because here I tested and worked normal for both $_GET and parse_url

<?php
    $url = "http://m...content-available-to-author-only...s.com/vedere/vede_musica.php?a=us&b=r";
    $result = parse_url($url);
    parse_str($result['query'], $var);

    print_r($var);
?>

This will return:

Array
(
    [a] => us
    [b] => r
)

$var is now a array with the parameters passed in the URL.

Idone Example

    
10.04.2017 / 15:28