Pages

Thursday, 21 December 2017

Query String PHP

Query String PHP

Query string is part of an URI which is use to pass some information in URL. Information pass by a query string can be used by server or client by java script or any server side language. Query string is one most powerful method to pass additional information about web processing application but query string is not recommended to pass sensitive information because query string put flat text which can be read by anyone.


Query string start with symbol? After URL followed by a name and relevant value. More than one value can be passing with single query string. Query string Variable name start with & symbol.

e.g


Reading query string


PHP has built in super global variable used for read a query string variable value.

<?php
echo 'Hello ' htmlspecialchars($_GET["name"]) . '!';
?>



No comments:

Post a Comment