Jump to content

Notice: Undefined index: mode


Texan78
Go to solution Solved by Texan78,

Recommended Posts

Hello, forgive me for this question in advance. I have looked all day for a fix to this and nothing I have come across has resolved this. My host upgraded to the most recent PHP several months ago and since it has thrown errors on certain scripts. I have gotten tired of looking at them and haven't been able to find a fix on my own so here I am. I am getting the below error. 

 

Notice: Undefined index: mode in /home4/mesquiu0/public_html/NSDisplay/NSStorms-include.php on line 38

if ($_REQUEST['mode'] == 'expired') {                    // We only want the expired storms
	$filetoRead = $expiredfile;
	$arraytoUse = $Expired;
} else {
	$filetoRead = $stormfile;
	$arraytoUse = $Active;
}

I am pretty sure it needs an inset call but not sure how to go about formatting that as I have done with the others errors I have come across. Any suggestions to this error?

 

-Thanks!

Link to comment
Share on other sites

  • Solution

Disregard, I am an idiot and got it sorted. 

 

Changed this....

if ($_REQUEST['mode'] == 'expired')

To this....

if (isset($_REQUEST['mode']) == 'expired')

Errors are now resolved. Guess I was having a brain fart and was putting the closing ) in the wrong place. Sorry for the question. 

Edited by Texan78
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.