PROBLEM IS THAT WHEN I SET THE SESSION VARIABLE AT TOP OF THE PAGE IT CHANGES AUTOMATICALLY
EG..
Code: Select all
session_start();
print_r($_SESSION);//changes $_SESSION['LANGUAGE'] value is now 'image'
//This was changes automatically don't know how
//Get Variable comes like /LANGUAGE/0 OR /LANGUAGE/1
$Application = Application::GetInstance();//This Process all the Get variable and other thing comming from url
$Application->Startup();
if(isset($_GET['LANGUAGE']) && trim($_GET['LANGUAGE'])!=''){
$_SESSION['LANGUAGE']=$_GET['LANGUAGE'];
}else if(!isset($_SESSION['LANGUAGE'])&&trim($_SESSION['LANGUAGE'])==''){
$_SESSION['LANGUAGE']=0;
}
//Again Session is set to normal Value 0 or 1
print_r($_SESSION);
I'm sure in page there is no other value than 0 or 1 of session LANGUAGE
but when i refresh the page and try to exit() on first session print (i.e print_r($_SESSION)) it changes and show ($_SESSION['LANGUAGE']=>images) and when i print at last it show normal result.
I'm not getting that even if SESSION value is normal at the end of the code why it changes at begining.
Also try with different session name but still the value change it is blowing up my mind i've been trying to solve this case for last two days
if you have been experincing such thing .