On Fri, Mar 25, 2011 at 08:18, matty jones <[email protected]> wrote:
> I get the following error " PHP Notice: Undefined index: publisher in
> /var/www/testfunctions.php on line 65" and I have narrowed it down to what I
> *think* is a variable not being declared. Here is the code.
This line is the issue:
> if ($d_series_fetch ->execute(array($_GET['publisher']))) {
$_GET is populated, in part, by the query string --- the data
following the question mark in your browser. For example:
http://example.com/fake.php?publisher=Random%20House
<?php echo $_GET['publisher']; // Output: Random House ?>
So, as you can see, it's complaining because you didn't give it
that information. If you don't always want to have to do so, surround
it with an isset() case.
--
</Daniel P. Brown>
Network Infrastructure Manager
http://www.php.net/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php