February 10th, 2000, 06:30 PM
I have a page whitch I load with different querystring variables. Sometimes (not every time!) i get a warning like this:
Warning: Undefined variable: delete in
/home/q/quickmes/www/alfa/history.phtml on line 42
this happens when i do not use the variable (in this case "delete").
This does not look good on my page...
what should i do to get rid of the warning?
February 10th, 2000, 07:59 PM
You can lower the error reporting level in php.ini
February 10th, 2000, 08:11 PM
Well I don't have access to the php.ini file (I've got my homepage at a webhotel).
Is there any other way ?..
February 10th, 2000, 09:34 PM
You can set error reporting within a script using the error_reporting() function. It uses a bit mask for determining the types of errors/warnings returned. You want to turn off e_notice(mask 8). The remaining values are e_error(mask 1), e_warning(2), e_parse(4), e_core_error(16) and e_core_warning(32).
So you should use:
That should do the trick.