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

Undefined index PHP with echo radio buttons value

Hotel kamer reservering



éénpersoonskamer

user9737826
-2
votes
2 answers

getting Notice: Undefined index: text in .... at line 4

4:$textik = $_POST['text']; and im getting notice: Undefined index: text in path/to/script on line 4. why? the url is http://somesite.domain/path/to/script?text=something Thanks for answers edit: full script in path/to/script is …
Dan B.
  • 93
  • 1
  • 1
  • 12
-2
votes
2 answers

AJAX - Undefined PHP variable

I have the following problem, the following script sends a keyword a PHP file hosted in another domain (I already added the CROS headers), this PHP returns me some "echos of different variables" (title, thumbnail, url, etc.) And it works but…
Kokox
  • 519
  • 1
  • 9
  • 24
-2
votes
3 answers

Undefined Index in PHP using textarea

I've seen dozens of posts about this issue and it basically comes down to a variable not being declared or given a value. However I'm 100% sure it's the same and declared. I have a basic contact form in HTML and I want it to send me and e-mail when…
CardDeath
  • 132
  • 11
-2
votes
1 answer

Tough one... I'm getting undefined index errors

I'm working on this project and the goal is to have these forms search a database and pull the data out in a table like format. When I try to load this I'm getting undefined index errors...
Anthony Sawah
  • 57
  • 1
  • 7
-2
votes
2 answers

Sorting table using sql query, undefined index for PHP

I am currently coding for sorting of names in a table column. When the user clicks the header(link to js func), the table will the names. However, I am having some trouble. I get a notice of an undefined index(which I know many people do and I have…
kross
  • 475
  • 1
  • 11
  • 31
-2
votes
2 answers

What is the point of using 'isset()' in these cases?

$input is an array with some values, and I am sure the key from the bellow code example exists. $points is an array of strings. I am simply getting Undefined index: (with no other information) for this code: foreach ($points as $point) { …
Milkncookiez
  • 6,817
  • 10
  • 57
  • 96
-2
votes
1 answer

PHP - Notice: Undefined Index

I know how to do the isset thing, and I also know that the notice itself is no biggie, but it still bothers my ocd. This is how my page handling the variables in the mentioned lines is set up: //this part gets the page name from the url or sets the…
-2
votes
1 answer

Undefined index notice in PHP while using MySQLi

I've written this code to list data from the utenti table: query($sql); if($rs === false){ echo "Errore Sintassi SQL" . $conn->error; }else{ …
starbuck
  • 171
  • 3
  • 12
-2
votes
4 answers

PHP Undefined Offset Within Class

This one's been bugging me for the past day now. Here's the code: public function getUserCredits() { $dbl = new databaseManager(); $dbl->connect_simp(); $ret = $dbl->queryDB("SELECT * FROM users WHERE `USER_ID` = ".$this->userId); …
jhmckimm
  • 870
  • 6
  • 15
-2
votes
2 answers

PHP undefined index, function, parameter 2 to be resource, null given

I am getting the following errors when i am trying to insert parsed data into a table in my database: PHP Notice: Undefined index: manu in /home/svn/dev.comp/Asus.php on line 112 PHP Notice: Undefined index: partnumber in…
ash
  • 93
  • 5
  • 14
-2
votes
4 answers

undefined index $_POST, but is defined

I have a $_POST index defined but get the error-message that it's not defined. Here's the code: if (isset($_POST['submit']) AND ($_POST['userid']) AND ($_POST['firstname']) AND ($_POST['lastname']) AND ($_POST['address']) AND ($_POST['ZIP']) AND…
Krystian
  • 85
  • 2
  • 11
-3
votes
1 answer

Undefined offset: 0 - PHP Errors in Ajax Response

I am sure this is a simple fix, but I can't seem to figure it out. Error is Undefined offset: 0 My code actually works, but getting this error in the browser console. I've tried looking at this answer here and declaring the variable, however it's…
Giuls
  • 570
  • 11
  • 33
-3
votes
1 answer

Undefined index error in PHP while uploading file

I have such a form for uploading files and creating new directories:
Pavel Z.
  • 45
  • 1
  • 12
-3
votes
2 answers

PHP Login System

So i am having a slight problem with my PHP login system.When trying to login it continues to say username/password incorrect although it is stored in the database and there is an undefined index. Login page
Brendan Oggeri
  • 73
  • 1
  • 1
  • 5
1 2 3
18
19