Undefined index


I am new to php and i have the following problem. I installed php and mysql on a windows server and we moved to the server a working php page with its data base. I modifyied the php.ini file and we can see php pages fine but when these pages have some dynamic content from the DB it comes with an error. Here is what i get:

Couldn’t execute query.PHP Notice: Undefined index: shortlist in C:InetpubwwwrootLocalUserftphhbrascalsrascalsshortlist.php on line 3 PHP Notice: Undefined index: action in C:InetpubwwwrootLocalUserftphhbrascalsrascalsshortlist.php on line 4 PHP Notice: Undefined index: shortlistid in C:InetpubwwwrootLocalUserftphhbrascalsrascalsshortlist.php on line 5 PHP Notice: Undefined index: client in C:InetpubwwwrootLocalUserftphhbrascalsrascalsregister.php on line 25

So i dont know what is causing this - the page is online still on the old server and is working fine.

Thanks inadvance

Please help me solve this problem. I red so many info for php mysql and settings but i cant find whats wrong with this websie. I think it might be somethng with the settings on the server but i dont know anymore what can be changed.


The error reporting in you php.ini file is set to a higher level of reporting.

What those errors are, are undefined variables.

You need to declare your variables before you use them.

$myVar = “”;

You can also turn down the error reporting in you php.ini file as well, but that isn’t recommended as you should try resolve all notices, warnings, and errors, before putting the script into production.

Also, if you want a quick resolution, you can use the error_reporting() fucntion at the top of you page which will over ride the php.ini setting.


Thank you. That helped me a lot.