3 Replies - 149 Views - Last Post: 15 March 2014 - 12:41 PM Rate Topic: -----

#1 duke2go  Icon User is offline

  • New D.I.C Head

Reputation: -6
  • View blog
  • Posts: 29
  • Joined: 24-September 13

Help: Undefined Index Notice

Posted 15 March 2014 - 12:07 PM

Hello, I keep getting an undefined index notice when I run my PHP file. I've tried adding an "if" statement and an isset, but nothing seems to be working. Here's the section of code I'm having an issue with:

$DriverList = $_SESSION['driverList'];



Thanks. :)

Is This A Good Question/Topic? 0
  • +

Replies To: Help: Undefined Index Notice

#2 JackOfAllTrades  Icon User is offline

  • Saucy!
  • member icon

Reputation: 6036
  • View blog
  • Posts: 23,418
  • Joined: 23-August 08

Re: Help: Undefined Index Notice

Posted 15 March 2014 - 12:16 PM

And what is printed if you add this line of code before that?

var_dump($_SESSION);

Was This Post Helpful? 0
  • +
  • -

#3 duke2go  Icon User is offline

  • New D.I.C Head

Reputation: -6
  • View blog
  • Posts: 29
  • Joined: 24-September 13

Re: Help: Undefined Index Notice

Posted 15 March 2014 - 12:21 PM

View PostJackOfAllTrades, on 15 March 2014 - 12:16 PM, said:

And what is printed if you add this line of code before that?

var_dump($_SESSION);


array(1) { ["driverList"]=> string(13) "countysheriff" }


"countysheriff" is one of the "drivers."
Was This Post Helpful? 0
  • +
  • -

#4 JackOfAllTrades  Icon User is offline

  • Saucy!
  • member icon

Reputation: 6036
  • View blog
  • Posts: 23,418
  • Joined: 23-August 08

Re: Help: Undefined Index Notice

Posted 15 March 2014 - 12:41 PM

And did you get your "Undefined index" error? If you did, then I don't think you're looking at the right code.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1