Some one please explain me this part of code
I have completed PHP course , i know basics well .Im doing a case study on project to develop my PHP knowledge , if you have time, please explain me $GET[a],
1.why "a" is needed.
2.From where value is passed to "a"?
the above $GET[a] is repeated in many php pages on this project, i couldnt figure out , why?
if you need complete code,i could send you
Below is the some code of index page. Index page consist of book search and login section.
$errMsg = "";
//$a="search.php?txtsearch=" . $_POST[txtsearch];
$a="search.php?cboCategory=" . $_POST[cboCategory];
$_SESSION[searchtext] = $_POST[txtsearch];
$_SESSION[searchauthor] = $_POST[txtauthor];
$_SESSION[searchbook] = $_POST[txtbook];
$_SESSION[cboCategory] = $_POST[cboCategory];
$sql="select nUserId,cUserType from Users where
First off, welcome to the community :-) !
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.
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:
Now that we know that, to answer your question. Using our example again we would extract the value
In your example, the GET variable
To tie this up, using our above example of:
I hope I have explained it well for you :-) Please let me know if not.
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.
They're performing different actions based on what the
|All times are GMT. The time now is 06:47 AM.|
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0