1phpCopy<?php
2$url = "https://testurl.com/test/1234?email=abc@test.com&name=sarah";
3$components = parse_url($url);
4parse_str($components['query'], $results);
5print_r($results);
6?>
7
1phpCopy<?php
2$url = "https://testurl.com/test/1234?email=abc@test.com&name=sarah";
3$components = parse_url($url, PHP_URL_QUERY);
4//$component parameter is PHP_URL_QUERY
5parse_str($components, $results);
6print_r($results);
7?>
8
1<form action="/" method="get">
2 <input type="text" name="search" placeholder="Search...">
3 <input type="submit">
4</form>
5<?php
6 echo $_GET["search"]
7?>