PHP unset() SESSION data always executed before echo -


lets have code:

var_dump($_session); ?>          <div class="customerrormessage">             <img src="" /><?php echo $_session['message']; ?>         </div>  <?php unset($_session['message']); var_dump($_session); 

this produces: 1. empty session array var dump 2. div 3. warning, index not found 4. empty var dump session array

lets add die() line 2 here. happens: session array var_dumped , message there!

how possible? looks unset() executed before echo always.

my goal show error message user transported page page via $_session , not shown more once (so if shown, delete it).

this sounds intern php problem me?

thanks!


Comments

Popular posts from this blog

Email notification in google apps script -

c++ - Difference between pre and post decrement in recursive function argument -

javascript - IE11 incompatibility with jQuery's 'readonly'? -