Error notification: DB_NAME constant already defined in

I have a file that shows a form and validates it. when showing the form everything is fine, but when I click the submit button to check the form, I got an error here, although the form is well verified, the error is:

notice: Constant DB_NAME already defined in C:\wamp\www\ssiphone\ss-config.php on line 15

thanks for reference :)

+3
source share
3 answers

Perhaps you are using include or require instead of include_once or require_once. If the file in which DB_NAME is declared is included more than once, it will throw this error. Otherwise, you can simply have multiple declarations in your code.

+6
source

, . DB_NAME, . , , .... , .

+1

I think you used, included, or requested to include the file, and the file may contain a constant value. Replace

require_once("FILE_PATH"); or
include_once("FILE_PATH");
+1
source

All Articles