![]() |
"Use of undefined constant" and $_POST['aaa']
I wanted to update the company server from XAMPP 1.73 to 1.81 today, but thought, well, just do it at home first. And bongo, nothing works!
PHP Code:
I think it may be related to isset, or the lack of it. Hope to get some hints here. |
You might as well as have an IF check because the $date is probably messing things up in some code somewhere else which is still being executed whether $_POST['date'] has anything or not.
|
This will not throw an undefined constant notice:
PHP Code:
PHP Code:
Given the names in your filepaths here and the comparison criteria there, I'll sure raise question to future help requests. |
Quote:
Now time to learn more about 'isset'..... |
Quote:
|
Solved the problem by using isset for each error at the beginning of the page:
PHP Code:
But maybe a better way is to leave it in php.ini at the default error_reporting = E_ALL | E_STRICT and and use on your page i.e. error_reporting("E_COMPILE_ERROR|E_ERROR|E_CORE_ERROR"); I am aware that it's better to have all errors reported and just write better code. |
| All times are GMT +1. The time now is 05:22 AM. |
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.