0

i have to work on project with sharing others . in xamp and wamp all thing is right but when run online demo in host all page contain "Notice: Use of undefined constant"error . i know with 'constant' error remove but error line is too many and i cant find them and remove line by line . how can i fixed this problem? or force host behavior like xamp????

 Notice: Use of undefined constant submit - assumed 'submit'
 Notice: Use of undefined constant del 
 Notice: Undefined variable: flag

There are too many errors and I can not fix everything .

Salman A
  • 262,204
  • 82
  • 430
  • 521
bnnoor
  • 656
  • 2
  • 13
  • 31

2 Answers2

1

If you have any kind of config file that is included in every page, you cold try to set at the start something like:

error_reporting(E_ALL ^ E_NOTICE);

Alternatively, you can locate php.ini file and find the line(s) that defines default error handling behavior, and set it to something like:

error_reporting = E_ALL ^ E_NOTICE
sergio0983
  • 1,232
  • 8
  • 15
0

My guess since you haven't provided your code is you haven't quoted array keys -

E.G. you've used

$_POST[submit] 

instead of

$_POST['submit'] (or $_POST["submit"])
iamgory
  • 862
  • 1
  • 6
  • 10