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

getting undefined index in php when sending data from ajax

I need to send ajax data to the PHP POST method, but I get undefined index "name". I have tried including dataType: json in ajax and json_encode(). In console, I am getting the whole HTML code when logging success: function(data){}. …
0
votes
1 answer

I want to check values are present in the array and print one random value, but it is giving undefined index error

I want to check values are present in the array and print one random value, but it is giving undefined index error Here is the code
0
votes
1 answer

Ignore Column Import in Laravel-Excel Maatwebsite

Can I ignore Excel columns import in Laravel-Excel Maatwebsite? My example has a column A B C D E F G H. But I have 4 different excel file types, namely: File 1, there is a column header A B C F G H File 2, there is a column header A B F G H File…
0
votes
0 answers

Notice (8): Undefined index

I'm trying to make a cakephp project work on my local computer, after setting up everything the login page works perfectly, after login in I'm getting this error: and this is the code of line 111: some help please! My friends have the same code…
Lara
  • 23
  • 6
0
votes
1 answer

undefined ProfilePage index in instagram _scraper_

for few days am searching for the solution of this issue. This issue was suddenly appeared. It was working fine last week. But not now. I am getting the error undefined index ProfilePage when I print the userArray in instagram scraper. Instead of…
Hari Raj
  • 1
  • 2
0
votes
2 answers

Tried solutions for undefined index but failing with the same error

I'm trying to troubleshoot an error with not being sent. Long story short - I've added this error handler, to the contact form. It's reporting the following:- E_NOTICE Error in file �EmailScript.php� at line 72: Undefined index: action The…
Kevin Lynn
  • 11
  • 3
0
votes
2 answers

jQuery Ajax passing input values from one modal to another

I have a modal for entering user information. A user should be linked to a building. After user information has been entered and submit button has been clicked, I am preventing the default action and am overlaying/showing a building modal over the…
0
votes
1 answer

Notice: Undefined index product_name

I have this code and I can't understand why I still have this ERROR, I've tried all the solutions but I can't solve this problem: -Notice: Undefined index: product_price -Notice: Undefined index: product_quantity -Notice: Undefined index:…
Razvan Andrei
  • 39
  • 1
  • 7
0
votes
1 answer

unsetting session variable before setting it again results in 'undefined index' on use

I'm unsetting some session variables before setting them again, but I've found that they result in undefined index on usage. I removed the line that unsets the variables before setting them again and that works well. I don't understand why unsetting…
Jh62
  • 324
  • 1
  • 3
  • 15
0
votes
1 answer

WordPress: Issues with wp-includes/canonical.php Undefined Index in Host

Just had my server rebooted and now five errors, all related to canonical.php in the wp-includes folder show up: [Sun Sep 22 19:55:37.037647 2019] [php7:notice] PHP Notice: Undefined index: host in…
Adam Bell
  • 1,049
  • 1
  • 16
  • 50
0
votes
1 answer

Undefined index: log_path in /

When i share a post with my app i got this issue: Notice: Undefined index: log_path in /tjgnsdl1234/www/system/core/Log.php on line 118 Notice: Undefined index: log_path in /tjgnsdl1234/www/system/core/Log.php on line 118 Warning: mkdir(): Invalid…
elalekey
  • 325
  • 1
  • 3
  • 10
0
votes
1 answer

Undefined index: file_upload in PHP 7.2.1

I'm getting the error Notice: Undefined index: file_upload in C:\MAMP\htdocs\basic_files\upload.php on line 3 When I load the page to upload the file in the form. I know a lot of other people cite a problem with the enctype or php.ini settings…
0
votes
2 answers

Strange problems with Javascript "multi-dimensional arrays" ( ie. arrays of arrays )

I have been working on a project in Javascript and after a certain development stage, the code stopped working. I've narrowed the problem down to creating and indexing "multi-dimensional" arrays in Javascript. I've included code just to test…
0
votes
2 answers

How to access object inside multidimensional array with json decode in PHP?

I'm struggling with accessing elements of arrays. I'm sure it's easy but I always get undefined index errors. Display Array : // Get response $synresponse = curl_exec($chs); // Decode $variants = json_decode($synresponse, true); Returns : { …
user10844414
0
votes
1 answer

Notice: Undefined index: adObjID in /home/xxxxxxx on line 28

in my script there is an error Notice: Undefined index: adObjID in /home/reffsite/xxxx.com/sell-edit-item.php on line 28 I don't know what is the problem for real since im not good in coding /* Variables */ $adObjID = $_GET['adObjID']; $adObj =…