top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

What is queryString?

+2 votes
465 views

Pros n cons of using querystring over other methods!

posted Aug 14, 2014 by Merry

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+4 votes
 
Best answer

Query String

[YOU search something or send any random any information like name,books name(in books site) that information goes through URL. The information you just have sent will be processed by query program ($_GET Method) and are processed by the PHP interpreter finally the it is searched onto the database tables. ]

Query String is basically a part of your URL which is sent to the web server as a query and web server processed this query by looking into the database tables. It is also used to pass data between multiple pages.(like session)

Example : 1
http://www.randomexample.com/eg?id=3 // you need example which has id 3

Example : 2
http://www.namesearch.com/thesearch?name=yoyo&industry=bollywood

In example one you search for the any example which has id 3. Query string is always located into the URL. AND it always come after ? symbol. id is any variable which is defined in your html form and as well as in your php script. PHP script will use $_GET method to get this id=3 from the user.

In example to you have two variable & is used to separate one variable from another. In the above example after ? name and industry are the variable of query string declared in your html form and in PHP script. Query string is also known as http query string.

Simple explanation : Query String is basically used to request some info from the web server and to transfer data between multiple pages.

PRO's
Easy to use.
Almost all browser support query string

CON's
User can insert any value in the query string because it's data is directly visible in the browser.(hacking stuff)
Query string are not safe from SQL injection
There is limit of character can be send through query string.(255 characters)

answer Aug 14, 2014 by anonymous
Similar Questions
+4 votes
+4 votes

Can someone brief me about the new ASP.NET Identity system.

+9 votes

Please can anyone tell me the basic steps to create and use a delegate.

...