Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I am confused on how to define $_SESSION['text']

On one page I defined:

$_SESSION['picture1_type'] = $_FILES['picture1']['type'];
 echo     $_SESSION['picture1_type'] ;

echo displayed the correct data. image/gif

On the next page, I echo:

 echo "Session 1 = ".$_SESSION['picture1_type'];
  echo "Session i = ".$_SESSION['picture'.$ii.'_type'];

Now both display empty value.

Session 1 = Session i =

What can make a session variable reset to "" ?

The other session variables on all pages work correctly; so it is only this
session variable that is resetting.

Is it necessary to define a variable on one page and form the session
variable on the next pager?


Re: Sessions

Quoted text here. Click to load it

Did you call session_start() at the beginning of the page?

Re: Sessions

Yes, session_start() is called on each page.

There are other session variables that are working.


Quoted text here. Click to load it

Site Timeline