Re: Undefined Index ...confusion
| From: | Kyle Smith | Date: | Thu, 23 Jul 2009 14:34:31 +0000 |
| Subject: | Re: Undefined Index ...confusion | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-295756@lists.php.net to get a copy of this message | ||
Miller, Terion wrote:
On 7/23/09 9:24 AM, "Kyle Smith" <kyle.smith@inforonics.com> wrote: Miller, Terion wrote: I keep getting this error while trying to use the field 'ID' to pass in a url.. And it's odd because the query is pulling everything BUT the ID which is the first field... code: <a href="view.php?ID=<?php echo $_SESSION['fullRestaurantList']['ID']?>"><?php echo htmlspecialchars(stripslashes($_SESSION['fullRestaurantList'][$i]['name'])); ?> We're going to need to know how the $_SESSION['fullRestaurantList'] gets populated. Also, where do you define $i? Is $i the ID? Seemed like you've built an array of arrays and you may want $_SESSION['fullRestaurantList'][$i]['ID'], or just $i. This is all speculation from the 2 lines of code I've seen though. - Kyle The full script is (I have my Entourage email settings on html so I hope this displays ok for you all---seems I've been told it turns into a mess in some views) : It sure did turn into a big mess. Could you try using a pastebin service? You should do this as a general best-practice anyway. Long email threads tend to turn people off to helping you.Go here: http://pastebin.ca/ Paste your code and select "PHP" for Syntax Highlighting, then click submit. You'll be given a short URL to share with the thread that will bring us to an easy-to-read version of your code. - Kyle