No problem.
$_GET is a global array defined by default. However, when you request a $_GET['image'], the array $_GET will need to have an index with a key image and some value defined. Otherwise, it will output an error. This is only if $_GET['image'] is on the right side of an equal sign, like:
$something= $_GET['image']
This is saying that you want to define a new varaiable named something with a value that is equal to the value of $_GET['image']. Of course, the value of $_GET['image'] needs to exist before you can pass that value to another variable. This is why, it that value is not there, it will generate an error.
So how to you pass/define a $_GET key/value?
Normally, when that page opens up, it should be defined in the url. so on a previous page, something like this link would define the value of a $_GET array key.
<a href="http://www.google.com?image=wolferd&page=user">Some Link to google</a>
so when you click on that link and google.com opens up, that page could use the following values:
$image = $_GET['wolferd'];
$user = $_GET['page'];
Hope it helps.
|