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

Notice: Undefined index: how to solve

I'm making a very basic login page with HTML & PHP. However, when I press the login button, a Notice: Undefined index:mail shows up. As you can see in the code, I've used an if (isset($_POST['submit'])) so I can't imagine that being the problem.…
user3182261
  • 271
  • 2
  • 10
  • 21
0
votes
3 answers

Smarty html_options

For smarty's html_options function, is there a way to avoid having to do this (other than not using smarty that is)? {if $smarty.post} {html_options name=option_1 options=$options selected=$smarty.post.option_1} {else} {html_options…
SeanJA
  • 10,234
  • 5
  • 32
  • 42
0
votes
1 answer

Undefined Index Name when trying to pass values from Jquery to PHP

So, I'm working on figuring out how to post data from Jquery to PHP, And as much as I follow the examples I've found on the threads here, I keep getting an "Undefined Index Name" error. My code thus far for the JQuery side is
Draketh
  • 11
  • 3
0
votes
1 answer

Undefined Index Laravel 4.0 - Possible Bug?

I feel like I'm taking crazy pills here, so I hope I'm simply missing the obvious. Please find below exhibit a, my code including var_dumping: $statuscheck = $read->readResponse(); $statusResponse = $statuscheck['StatusCheckResponse']; echo…
Samuel Hawksby-Robinson
  • 2,652
  • 4
  • 24
  • 25
0
votes
3 answers

PHP login trouble

Having some trouble with a PHP login that I found online -
0
votes
2 answers

issue using $_GET and $_POST to echo something if a user has posted

I'm having an issue that's been driving me crazy for a while now because I just can't figure it out. I want to echo something like "succeed" if the user creates a post from a form. This is what i got so far in my db-querys file: if ($_REQUEST) { …
Bondenn
  • 1,701
  • 3
  • 15
  • 19
0
votes
2 answers

Undefined index in

I am new in php, while running i am getting an error in almost every page that "Undefined index........." dont know what to do with it Below is one of the example of login page - Thanks for the tips.....
Outstrip
  • 23
  • 3
0
votes
1 answer

undefined index in recursive method call

Update. this version works now - in case anyone is interested: /** * returns an array merge from two arrays. Keeps associative keys only. Prefers arrays as values. * If a key in both arrays has arrays as values the procedure is continued on the…
Peter Frey
  • 361
  • 4
  • 17
0
votes
2 answers

$_GET is not null and returns undefined id

i have being tried to do solve a problem with a undefined id but i can't. It says me that i have undefined id but if i don´t use "isset" the program runs really nice but i need the file outputs the information instead of the: Notice: Undefined…
0
votes
1 answer

ERRNO: 8|TEXT:Undefined index

i'm having a problem with my php code: browser show me this error: ERRNO: 8|TEXT:Undefined index:N° Asset con guasti i'm trying to do dinamic table taking data from a database, but something with the 'fetch_array(MYSQLI_ASSOC)' function must have…
Elius93
  • 3
  • 2
0
votes
1 answer

Undefined index when trying to echo array element

I have what will probably turn out to be major noob error. I have an array under $_POST that displays the following when I var_dump it: array(4) { ["user"]=> array(2) { ["username"]=> string(9) "webmaster" ["email"]=> string(24)…
neanderslob
  • 2,633
  • 6
  • 40
  • 82
0
votes
5 answers

I have this 3 undefined index error

I have this error, and I can't solve it: Notice: Undefined index: id in C:\xampp\htdocs\store\header.php on line 10 Notice: Undefined index: user in C:\xampp\htdocs\store\header.php on line 11 Notice: Undefined index: password in…
Afzal
  • 17
  • 1
  • 4
0
votes
3 answers

How to solve undefined index error

if(isset($_SESSION['evt_year']) || isset($_SESSION['evt_title']) || isset($_SESSION['evt_sdate']) || isset($_SESSION['evt_place']) || isset($_SESSION['evt_stime']) || isset($_SESSION['evt_etime']) ||…
Alin
  • 21
  • 1
  • 1
  • 5
0
votes
1 answer

Why gives the undefinded index error?

if(isset($_POST['dino_c']) AND isset($_POST['dino_box']) AND…
naser
  • 171
  • 2
  • 13
0
votes
2 answers

Notice: Undefined Index in Xampp. How do I fix this?

Before you ask, yes I have searched through nearly 20 different "undefined index" questions on SO before asking this question. Sadly none of them managed to even give me a clue to fixing the problem. I have a simple index.php file that switches…