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

PHP Undefined Index on PHP Self

I keep getting a undefined index error on my page. I have tried different things, but can't seem to get rid of it. I have a project where I have to create a simple area conversion running Server PHP Self.
Conner Burnett
  • 502
  • 1
  • 11
  • 24
0
votes
1 answer

Updating data in table PHP mysql error

I am trying to update a data in a table which has 5 fields. The fields are the following: proj_name, cust_name, address, cost and details. Here is my code for the update (update_orde.php):
ekptwtos
  • 101
  • 2
  • 11
0
votes
3 answers

Undefined index in PHP post

I take a form and do variable checking in jquery then pass it to a php file in ajax but I am getting this notice Notice: Undefined index: your_name in C:\xampp\htdocs\process.php on line 3 something is wrong here Notice: Undefined index: your_email…
user1154295
  • 85
  • 1
  • 2
  • 8
0
votes
2 answers

I keep getting an undefined index notice

I have a form which contains a file input: var $fileImage = $("
user1324106
  • 171
  • 1
  • 3
  • 14
0
votes
1 answer

Undefined index - strange?

I experience something strange with an undefined index.. $vatcode = 'U25'; echo $this->vatcode_ids['U25']."\n"; echo $this->vatcode_ids[$vatcode]."\n"; foreach($this->vatcode_account_ids as $id => $vatcode){ echo $vatcode."\n"; echo…
clarkk
  • 27,151
  • 72
  • 200
  • 340
-1
votes
4 answers

Getting an undefined index error

my php is very "weak" so I am having trouble with this -
Aasim Azam
  • 263
  • 1
  • 4
  • 9
-1
votes
6 answers

Why am I getting "Undefined index" from my PHP?

When I run this code: I get this error: Notice: Undefined index: p in index.php on line 3
Sobbe
-1
votes
1 answer

Getting undefined index when retrieving json value of key name having a dot within in PHP

My JSON file has this structure: [ { "n.name": "name1", "n.section": ["section1"] }, { "n.name": "name2", "n.section": ["section2a", "section2b"] }, I parse it and having no error: $input = file_get_contents(__DIR__ .…
Ooker
  • 1,969
  • 4
  • 28
  • 58
-1
votes
1 answer

Notice: Undefined index: on session variables possible to ignore?

Backstory I used to host my website on a GoDaddy dedicated server. Typically I would (on successful user login) apply something to a _SESSION variable to determine a user was successfully logged in like if ($_SESSION['user_logged_in'] == true) { …
Cesar Bielich
  • 4,754
  • 9
  • 39
  • 81
-1
votes
1 answer

How can I fix an undefined index?

I am connected to my local host and am trying to use a GET method on line $. I am getting the Notice: Undefined index: deleteid in C:\xampp\htdocs\webd153\delete.php on line 4.
-1
votes
1 answer

How do I solve 'Undefined index' error when the key exists?

"foreach" loop results in an 'Undefined Index' error when I manipulate an array. The array is generated from MS Excel and works fine with PHP array functions. When I use "foreach" loop to extract data, I get the 'Undefined Index' error but when I…
Tim Kariuki
  • 633
  • 8
  • 17
-1
votes
3 answers

undefined index name1 and Undefined index name2

these are the two files in which error is occurred: html_form.html

Admission Form


-1
votes
2 answers

Notice: Undefined index: username

I keep getting "Notice: Undefined index: username" when running this code. Notice: Undefined index: username in /public_html/handler.php on line 7 Notice: Undefined index: password in /public_html/handler.php on line 8 Notice: Undefined index:…
Ayden F
  • 3
  • 2
-1
votes
3 answers

Undefined Index ajax php

I have a problem. I tried all possible solutions but always getting undefined index. I've tried this before and it works fine. I don't know what happened today, I've just copy paste it. What I'm trying to do in here is to have an AJAX…
-1
votes
1 answer

$_POST["myFile"] is a valid index but $_FILES["myFile"]["name"] isn't

I am making a sign up page in php. I am getting the following errors: Notice: Undefined index: myFile in C:\xampp\htdocs\project1\form.php on line 63 Notice: Undefined index: myFile in C:\xampp\htdocs\project1\form.php on line 66 Warning:…