scootstah suggested I post the code that generates the error. I hope you all will forgive the code--it’s pretty unprofessional, being grabbed from tutorial pages and modified slightly (with lots of comments so I can remember how it worked later, when I have to update it). It’s a shopping cart page that uses GET rather than POST inputs. When the visitor clicks Add to Cart on a shopping page, the code executes a link to cart.php?cmd=add&id=<item no.> The cart-fuctions.php included file then parses the 'cmd' variable:
Kind of backwards, but it works. At one time I thought I would need the $action variable elsewhere, but now I don't. I start with (!isset()) just so the little bit of code that clears the @action variable is up on top where I can see it! The cart page goes on to display the item no. and other info grabbed from a MySQL database.
The item could not be displayed, nor can the quantity be updated, unless the $_SESSION;['cart'] array has been set. The index for the cart array is the [id] of the item to be sold.
The offending line that generates the array index warning is in the update_qty function, which, as I mentioned before, cannot be called w/o something being loaded already into the $_SESSON['cart'] array:
I know it is always tempting to blame someone else for problems in code. But in this case it seems justified. Remember that the server reported file "include(includes/cart_functions.php)" as missing, then went on to load and execute its contents--which incidentally contains the code block that started this whole thread)! Also, the server stopped reporting the not found error when I replaced the underscores with hyphens in the included file names. This certainly is not normal behaviour, is it?
BTW I stuck in this statement for testing: print_r($_SESSION['cart']);
It produced this response: Array ( [32] => Array ( [q] => 5 [d] => 0 ) )
I'm still scratching my head. Any other ideas before I open a trouble ticket?