URGENT: Index Not found error

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Hi all

I have a php form which refers to variables like -



What happens is that these variables are not recognized and i get the
following error -

PHP Notice: Undefined index: status in
c:\inetpub\wwwroot\sma\members\login.php on line 71

here status is being referred to as :-


is there anything wrong with my php settings? The same code works fine
on my ISPs web server.

Please let me know why this is happenning and how to correct it - and
its needed to be fixed asap.

Thanks in advance


Re: URGENT: Index Not found error


Quoted text here. Click to load it

When do you get this error/notice? A bit more code and some more
explanations would be helpful.

Quoted text here. Click to load it

Of course $_GET['status'] only exists if the page in question was called
with an URL parameter of this name, e.g.


or if a form was submitted with an input element named 'status'. If you
call the page directly without any form or parameters then PHP will
complain about the unknown index.


Re: URGENT: Index Not found error

Most instances of PHP, by default, have notices turned off. Most likely
the case with your ISP. You can change your error settings in your ini
file. The error you're getting is basically telling you that you have
an undefined variable. Since PHP doesn't really care about undefined
variables, it throws you a notice instead of a typical warning or fatal
error. If you want to keep notices on for whatever reason, you'll have
to put a condition around the undefined variables to check to see if
they have a value.

Re: URGENT: Index Not found error


The problem was i waz trying to use $_Session['xyz'] and before using
this variable one has to call - session_start() !!

without which session variables don't work. Ofcourse notices are turned
on in the error reporting thus those messages!

Now its fixed



colyn wrote:
Quoted text here. Click to load it

Site Timeline