Finding The Query String In a URL


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. <?php
  2. # Using QUERY_STRING
  3.  
  4. $queryString = $_SERVER['QUERY_STRING'];
  5.  
  6. echo "Query: " . $queryString;
  7.  
  8. ?>

URL: http://www.learnphponline.com/php-basics/how-to-find-the-current-url-in-php

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.