> But on another site it still works, but gives this error:
> Notice: Undefined index: UserWishesDateRange in
> /home/vs/site/phvs/bl/7solarsecrets/admin/trackingcode.html on line 79
> I assume that is because the error display settings are set to a more
> rigorous level in this latter site.
> Is this correct?
It's either the 'error_reporting' configuration directive that's
different between the two servers, or 'display_errors', or both.
On one server the E_NOTICE bit-field is set in 'error_reporting', and
it sounds like 'display_errors' is also set (unless you're seeing that
notice in a log file).
On the other server, one or the other of those things is not set (or
both of them aren't).
You can use call ini_get('error_reporting') and
ini_get('display_errors'), to see what they're set to on each server.
Or just create a small page that only calls phpinfo(), to see all
Here's the write-up of the directives (one is right below the other):
As others have pointed out, it's a good idea to call isset() on a
POST-variable before trying to get at its value. This will avoid a
notice being thrown.
Lately I've stopped touching $_POST directly and started using
filter_input() instead; this also avoids the problem and provides
several other benefits:
The filter_* functions are only available in core since 5.2.0, though.
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php