[Solved] Notice: Use of undefined constant

Notice: Use of undefined constant :

 

This is one of the familiar exception in PHP.

 

Example PHP Source code which creates

notice: use of undefined constant

[php]

define(HOST, ‘localhost’);
define(USERNAME, ‘root’);
define(PASSWORD, ”);

[/php]

 

 

How it can be solved ?

[php]

define(‘HOST’, ‘localhost’);
define(‘USERNAME’, ‘root’);
define(‘PASSWORD’, ”);

[/php]

 

 

Feel free to post your comments……

Leave a Reply