1

I'm trying to implement buy.php, and I'm getting this list of errors, constant database already defined, Constant password already defined, apologize already declared. I don't know why this is happening for buy.php only. All my previous ones worked fine.

I tried replacing require with require_once but the error stays.

My buy_form.php works perfectly fine. It's only when I try to buy a share that this happens.

enter image description here

enter image description here

4
  • What is the exact message of each error in the list? Can you copy and paste it as it appears when you try to load the page? – Air Oct 30 '14 at 17:44
  • @AirThomas I've taken the screenshots of the errors. I hope they can help. – Amrita Oct 31 '14 at 7:47
  • Did you define DATABASE, SESSION or other variables in your PHP code? Those constants are already defined in the interpreter... – Cygni_61 Nov 2 '14 at 14:11
  • @Cygni_61 No i didn't. I just included config.php. – Amrita Nov 6 '14 at 8:32
1

Amrita, it looks like you have a require statement in portfolio.php that's triggering constants.php to be called again resulting in the errors. It should work if you remove that statement.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .