In Javascript i encode parts of the request parameter like this
window.location.href = "search.php?qry=" + encodeURIComponent("m & l");
In my Search.php i reach this like this
$url = urldecode($_SERVER['REQUEST_URI']);
echo ."Full URL: " .$url ."<br>";
$parts = parse_url($url);
parse_str($parts['query'], $query);
$qry = "Just Query: " .trim($query['qry']);
echo $qry ."<br>";
This prints out:
Full Url: /Search.php?qry=m & l
Just Query: m
Looks like the stuff after the &
is being dropped in the 'm & l`
What changes do i need to make in PHP or Javascript?