Tom
0
Q:

php get data from url

<?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']; 
  
?> 
3
// previous link 
<a href="test_get.php?subject=PHP&web=W3schools.com">Test $GET</a>
// the code
<?php
echo "Study " . $_GET['subject'] . " at " . $_GET['web'];
?>
0

New to Communities?

Join the community