I'm designing a page involving selecting components, however, with some components the custome开发者_如何学Cr just chooses not to buy anything from there. This means that one section of check boxes in the has no value assigned to it. Upon submission, this brings up the error
"Notice: Undefined index: undefined_index in D:\fileroot\page.php on line 300."
Is there any way to hide this?
Either:
error_reporting(E_ALL ^ E_NOTICE);
Or an @ before the statement containing the variable.
Or checking if(isset($variable))
before trying to acces it.
精彩评论