yup still a jr, at least for the next 6 months, than ill be a medium jr LOL...
alright, seriously, i need this thing done, so if you guys have any hints, pointers, would be appreciated.
it's probly not complicated for you guys, but i'm trying to write a language switcher. so far it works, it change all the text on the web site for the langugage selected.
but ... it doesnt keep $_SESSION value accros pages, it look like its resetting every time you change page. thought $_SESSION was a superglobal and was keeping info for all the time connected to the site. hmm... or maybe its the form that resubmit null on page refresh and onload and $_SESSION reset. I feel like a dog chasing his own tail.
here's my code so far: (this php file is include, in the head of all the content pages, which affect the child pages, header, nav, sidebar, footer)
now, maybe i miss understood $_SESSION or the form is screwing with my mind or my general construction is going in the ditch.
my last idea is a noob one, but what if i keep the var in a txt file and recreate what $_SESSION is supposed to do, at least what i thought he could do. - create file, add var, change var on $_POST, destroy txt file on exit -
any comments, hints, ideas would be nice.
ill go get somemore coffee and check that form idea i had while typing this (to check if its the form screwing around with my code)
To keep a lang setting in a session seems OK for a session duration, to store it as a preference, put it into a database or a file. But back to your problem: do you have anywhere in your script(s) the session_start() command? It is required on every page for sessions to work.