Questions tagged [undefined-index]

An index is undefined if it is not part of the array being accessed. Use this tag for questions regarding behaviour of undefined indexes or when you see undefined indexes where you don't expect them.

This notice appears when you try to access an undefined index of an array. These commonly appear when working with $_POST, $_GET or $_SESSION variables in PHP.

Use this tag for questions about the behaviour of undefined indexes or when you see undefined indexes where you don't expect them.

276 questions
0
votes
1 answer

Undefined offset and Undefined variable issue

Whilst attempting to run the below code, my browser keeps responding with the below errors. How can I fix the below code, so these errors no longer present themselves? To be clear, these errors appear only on the lines containing each of the…
0
votes
0 answers

Undefinex Index id PHP mySQL phpMyAdmin

Hello I am currently having an issue with my website, I have a basic list of Todo's that are accessed from phpMyAdmin database and I keep getting errors like this.. I cannot find a solution since I don't know what variable should be there Notice:…
A M
  • 3
  • 2
0
votes
0 answers

Undefined Index in JSON returned by an API call in PHP

This is my PHP file performing an HTTP request: $token='Food2forkKey'; //food2fork foo2fork private key $fooddetail=new…
Hacker
  • 160
  • 11
0
votes
0 answers

I'm trying to make a leader-board using mySQL and PHP for a JS game I made

I can fetch the a score from a database, but for some reason I keep getting an eerror: Notice: Undefined index: score in /var/www/html/game.php on line 26 PHP file where the game is: Breakout!