Forum Moderators: coopster
$_POST[var]
Because you are missing the quotes, it assumes "var" to be a constant, and when it cannot find it, php assumes that you meant to put the quotes in there and uses it as such; this however will still produce those notices. To fix it you'd just have to code it correctly :)
$_POST['var']
Question 1) To define a constant, however, you would use the define [php.net] method.
Question 2) You can turn your error reporting [php.net] down so that you do not get notified of any notifications like this with your error reporting directive in php.ini. Personally I allow everything to get logged to my error log so that I know if anything, no matter how small, goes wrong in my code. By default, the error reporting level should be set to E_ALL ^ E_NOTICE, I believe, but if it's not, then you might want to change it back to that. It will log all errors except notices.