There are actually two types of these predominantly used to pass variables to various documents. You've probably seen them when browsing websites. Typically, but certainly not always, they consist of key/value pairs.
Those are what we call GET variables. The other type are POST variables and they are sent with the HTTP request. They are in the same format as the GET variable (In key/value style) but are hidden away from the user as they are not present in the URL.
What I mean by key/value pairs is that the first item is the key, and the second being its value. Take a look at the following as shown in our example:
In there var2 would be the key, and TalkPHP is the value for that key.
Now that we know that, to answer your question. Using our example again we would extract the value TalkPHP from the URL using $_GET['var2'];. If you're currently knowledgeable about arrays, then $_GET is simply one big array that contains all the variables passed to it via GET (Not POST, for POST we have $_POST).
In your example, the GET variable a can be set to 1 or 2, or not at all. That is why there is an if statement checking its value.
Thank you , Wild honey for quick reply with informative examples . i think i confused you with my bad english sorry , my question was why does we use $GET[a] in the index page . Why that value is checked before using Login or Searching book.