Jump to: navigation, search

PHP URL Parameters

From w3cyberlearnings

Contents

PHP CURRENT URL Parameters

Get URL Parameters.

Example

<?php
  // http://www.woowood.com/index.php?c=3r4&id=3023
  echo $_SERVER['REQUEST_URI'];
  echo "<br/>";
  echo $_SERVER['QUERY_STRING'];
?>

Output

  • The first returns with the file name and the URL parameters.
  • The second returns with the URL parameters only.
  /index.php?c=3r4&id=3023
  c=3r4&id=3023

Related Links

Manage URL
  1. PHP CURRENT URL
  2. PHP CURRENT HOST
  3. PHP URL Parameters
  4. PHP URL PROTOCOL
  5. PHP URL Script Name
  6. PHP FULL URL
  7. PHP URL Parent Directory
Navigation
Web
SQL
MISC
References