php - Session doesn't work after redirect -


my code looks this:

... $_session['message']="something"; header('location:http://url/somewhere'); exit; 

as can see, have exit @ end of it. , problem. doesn´t work although have exit there.

i have problem on localhost. @ online server works well. in errorlog shows "undefined index message". few days ago installed new apache 2.4 , php 5.4.

don't forget start session on every page going use it:

 if(!isset($_session)){     session_start();  } 

Comments

Popular posts from this blog

javascript - DIV "hiding" when changing dropdown value -

Does Firefox offer AppleScript support to get URL of windows? -

android - How to install packaged app on Firefox for mobile? -