how to fix undefined index in PHP -


this little question, why getting error message?

severity: notice  message: undefined index: filter  filename: libraries/functions.php(656) : eval()'d code  line number: 43 

it says problem lays here:

$filter2 = $_get['filter']; 

i have defined filter2, want use filter2 compare if contains word 'realscan'

the problem fixed if use isset(), convert integer, cant use that.

if($filter2 == 'realscan') { //something here   } 

you need check see if defined before use it:

$filter2 = isset($_get['filter']) ? $_get['filter'] : ''; 

Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -