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
1
vote
0 answers

undefined index error in catalog.tpl in opencart

I have the following error everything I click on a category: Notice: Undefined index: listing_products_columns in /home/tkvtoys/public_html/catalog/view/theme/TKV/template/product/category.tpl on line 21
1
vote
1 answer

How to access JSON array with PHP

I'm using the Giantbomb API, which returns results like so; { error: "OK", limit: 100, offset: 0, number_of_page_results: 24, number_of_total_results: 24, status_code: 1, results: [ { expected_release_day: 8, expected_release_month: 5, name:…
DrWatson
  • 13
  • 2
1
vote
1 answer

MySQL: Changing a value in a column

The title nearly explains itself to be honest. I am trying to change my Delete column from 0 to 1, depending on what player has been selected from my listplayers drop down. My listPlayers.php file is working 100%. The players are showing up fine in…
BudgieBr0phy
  • 21
  • 1
  • 1
  • 8
1
vote
3 answers

How can I delete my undefined indexes in the array and move the others to position 0?

I'm having an array I'm unsetting. In my example, I'm unsetting the first object in the array. Array ( [0] => 1 [1] => 2 [2] => 5 [3] => 6 [4] => 7 [5] => 8 ) unset(Array[0]); It gives me back: Array ( [1] => 2 [2] => 5 [3] => 6 [4] => 7 [5] => 8…
Kenji Bailly
  • 107
  • 9
1
vote
2 answers

can't read cookie value after browser close and reopen, in php

I was trying to figure out how isset() and empty() related to setcookie() and $_COOKIE[]. But I came upon a road-block on the way. Here is my test.php
thanks_in_advance
  • 2,603
  • 6
  • 28
  • 44
1
vote
2 answers

Undefined index: image

Why is this not working? Trying to upload file using PHP. File in question is an image just need to store the file path. Trying this code but is not working. Any help?
title:
user3453021
  • 93
  • 1
  • 3
1
vote
5 answers

PHP $_POST error Please Help me I am learning PHP

I am learning PHP. Here is the source code. Here is the result. I don't know where is the…
1
vote
3 answers

Opencart Undefined index Errors in product

I am using OpenCart 1.4.9 and I have been dealing with Undefined index Errors in product.php recently, I suspect it happens every time the user is creating/input a new product on the dashboard. How to fix these errors because it makes the server…
paketonlinestore
  • 11
  • 1
  • 1
  • 3
1
vote
1 answer

What does this undefined index message mean

this code calls the values entered into a form and enters them into a database (or at least it's supposed to) every time the page loads it gives "undefined index" messages, and I am struggling to determine why. Any help that can be offered to me is…
user3081307
  • 1,211
  • 2
  • 10
  • 8
1
vote
1 answer

Codeigniter Undefined index userID as result from model

In my controller I load my model, then execute the function getAllUserInfo(). Basically that function just does a SELECT in my DB and returns the result() Now back to my controller I want to check the ID of the user that the result() returned to my…
mXX
  • 3,595
  • 12
  • 44
  • 61
1
vote
2 answers

Undefined Index on PHP Drop Down using selected

I am getting an Undefined index: for every ID which is over a thousand. I have tried everything to get the error to disappear and am hoping someone would be able to help. Please and Thanks in advance. $bamid is what is called from the page and it…
user2535904
  • 13
  • 1
  • 4
1
vote
1 answer

passing variable to my default.ctp cakephp

i am newbie in cakephp ..actually i have two problems .. first one is I am setting variables in AppController in order to use them in default.ctp. public function beforeRender(){ $id = $this->Auth->user('idUser'); …
hellosheikh
  • 2,929
  • 8
  • 49
  • 115
1
vote
2 answers

Call model function inside view joomla

How can we call different models and their functions in Joomla 2.5 view ? Model: settings.php // import Joomla modelitem library jimport('joomla.application.component.modelitem'); class UrcModelSettings extends JModelItem { public…
Prince
  • 1,280
  • 3
  • 25
  • 52
1
vote
1 answer

How to define cakephp mysql index?

I am very new to CakePHP and MySQL so I may not know how to properly ask this. I need to add a payment type radio button to a project I just inherited. I added the payment type radio button to the add and edit forms like this: $options =…
jacknad
  • 13,483
  • 40
  • 124
  • 194
1
vote
2 answers

PHP $_POST index undefined in Firefox and IE, works in Chrome

I have two files, a main page scada.php and a sub-page site.php. Scada.php contains links like this: