Wednesday, December 03, 2008

How to solve the issue: PHP Notice: Undefined index: ...

PHP Notice: Undefined index: ...
This is not an error. It is just a warning message. The solutions for this issue are as follows:

1: Modify php.ini, make sure: error_reporting = E_ALL & ~E_NOTICE.

2: Make sure you write the code in the correct way at the very first stage.

3: Add error_reporting(0); into the head of every php files. Or go to php.ini, find display_errors, set display_errors = Off. By this way, you won't get any message anymore.

4 :use: isset($_GET["page"]), if-else etc

No comments: