php get query string
snippet in php

php get url parameter

user6232

<?php 
  
// Inintialize URL to the variable 
$url = 'http://www.geeksforgeeks.org?name=Tonny'; 
      
// Use parse_url() function to parse the URL  
// and return an associative array which 
// contains its various components 
$url_components = parse_url($url); 
  
// Use parse_str() function to parse the 
// string passed via URL 
parse_str($url_components['query'], $params); 
      
// Display result 
echo ' Hi '.$params['name']; 
  
?> 

php get query string

user6655

<?php
	echo $_GET["query_name"]; // url queries are stored in $_GET 
?>

access http get params php

user3645

<?php 
  
// Inintialize URL to the variable 
$url = 'http://www.geeksforgeeks.org/register?name=Amit&email=amit1998@gmail.com'; 
      
// Use parse_url() function to parse the URL  
// and return an associative array which 
// contains its various components 
$url_components = parse_url($url); 
  
// Use parse_str() function to parse the 
// string passed via URL 
parse_str($url_components['query'], $params); 
      
// Display result 
echo ' Hi '.$params['name'].' your emailID is '.$params['email']; 
  
?>