php url parameters

Solutions on MaxInterview for php url parameters by the best coders in the world

showing results for - "php url parameters"
Niko
29 Jan 2020
1phpCopy<?php 
2echo $_GET['email'] . $_GET['name']
3?> 
4
Henri
25 Aug 2017
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
Shayna
20 Jul 2016
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
Amy
17 Jan 2019
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?>