Saiba como fazer a mudança para o php não exibir a mensagem de erro (!) notice,
que na verdade não é um erro, só aparece por não estar em servidor de hospedagem.
no wamp server clique com o mouse do lado esquerdo, seleciona php ,e clica no php.ini
ao abrir o arquivo em um bloco de notas,de um ctlr + f , uma janela de pesuisa sera aberta
digite nesta janela este codigo: error_reporting, de um f3 até localizar esta linha:
Common Values:
; E_ALL & ~E_NOTICE (Show all errors, except for notices and coding standards warnings.)
; E_ALL & ~E_NOTICE | E_STRICT (Show all errors, except for notices)
; E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR (Show only errors)
; E_ALL | E_STRICT (Show all errors, warnings and notices including coding standards.)
; Default Value: E_ALL & ~E_NOTICE
; Development Value: E_ALL | E_STRICT
; Production Value: E_ALL & ~E_DEPRECATED
; http://php.net/error-reporting
error_reporting = error_reporting = E_ALL
ao localizar apague o error_report = E_ALL e substiutua pela a linha acima, que é :
Default Value: E_ALL & ~E_NOTICE
ficando o codigo assim:
Common Values:
; E_ALL & ~E_NOTICE (Show all errors, except for notices and coding standards warnings.)
; E_ALL & ~E_NOTICE | E_STRICT (Show all errors, except for notices)
; E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR (Show only errors)
; E_ALL | E_STRICT (Show all errors, warnings and notices including coding standards.)
; Default Value: E_ALL & ~E_NOTICE
; Development Value: E_ALL | E_STRICT
; Production Value: E_ALL & ~E_DEPRECATED
; http://php.net/error-reporting
error_reporting = E_ALL & ~E_NOTICE ( aqui era error_reporting = E_ALL) Alterado para:
error_reporting = E_ALL & ~E_NOTICE) salve o arquivo reinicie o wamp server e pronto.
espero que isto tire a dor de cabeça de muitos programdores em PHP.