PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
that means that there was no array index "link" in the array $_GET. $_GET is a superglobal containing information sent within the uri of the request. if you attach ?link=foo to the end of your uri, that notice will go away... but that's not necessarily FIXING the problem, now is it? Maybe you should post a little more code?
generally, you want to check whether the array index is available before you attempt to use it... so so mething like this:
// assign a default value to $link
$link = false;
if(array_key_exists('link', $_GET))
{
// If link was set in the uri, assign it to $link
$link = $_GET['link'];
}
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
I suppose it's just a matter of preference. I haven't tested which is faster... d11 said something about testing them, but I don't know if he ever did.