Jump to content

Recommended Posts

I have a message bar that when a page reloads, a message appears at the top of the screen.

I feed the message with session variables that are set at the end of the action (submission for example)

When the page reloads the message displays and then unsets the session variables.

The issue is when the page first loads (when it has never run an action) and gives me the Notice: Undefined index: message.

My question is, how can i handle the session being blank when the page first loads and thus not get the notice.

Link to comment
https://forums.phpfreaks.com/topic/310008-session-handling-sundefined-variable/
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.